aboutsummaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-05-06 08:07:07 +0000
committerGitHub <noreply@github.com>2021-05-06 08:07:07 +0000
commit3de369fd696e6b98d00259d3c759d9b81df4e84b (patch)
tree7c489ea3aa926cda031d6aaa4a852e9e6e469d14 /vendor/google.golang.org/protobuf/internal/encoding/text/encode.go
parent9b9bd9e0e7b72c91d8e60103e8da7999cefbc63d (diff)
downloadpodman-3de369fd696e6b98d00259d3c759d9b81df4e84b.tar.gz
podman-3de369fd696e6b98d00259d3c759d9b81df4e84b.tar.bz2
podman-3de369fd696e6b98d00259d3c759d9b81df4e84b.zip
Bump github.com/onsi/gomega from 1.11.0 to 1.12.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.11.0 to 1.12.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.11.0...v1.12.0) Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/google.golang.org/protobuf/internal/encoding/text/encode.go')
-rw-r--r--vendor/google.golang.org/protobuf/internal/encoding/text/encode.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go
index c4ba1c598..aa66bdd06 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go
@@ -32,7 +32,6 @@ type Encoder struct {
encoderState
indent string
- newline string // set to "\n" if len(indent) > 0
delims [2]byte
outputASCII bool
}
@@ -61,7 +60,6 @@ func NewEncoder(indent string, delims [2]byte, outputASCII bool) (*Encoder, erro
return nil, errors.New("indent may only be composed of space and tab characters")
}
e.indent = indent
- e.newline = "\n"
}
switch delims {
case [2]byte{0, 0}:
@@ -126,7 +124,7 @@ func appendString(out []byte, in string, outputASCII bool) []byte {
// are used to represent both the proto string and bytes type.
r = rune(in[0])
fallthrough
- case r < ' ' || r == '"' || r == '\\':
+ case r < ' ' || r == '"' || r == '\\' || r == 0x7f:
out = append(out, '\\')
switch r {
case '"', '\\':
@@ -143,7 +141,7 @@ func appendString(out []byte, in string, outputASCII bool) []byte {
out = strconv.AppendUint(out, uint64(r), 16)
}
in = in[n:]
- case outputASCII && r >= utf8.RuneSelf:
+ case r >= utf8.RuneSelf && (outputASCII || r <= 0x009f):
out = append(out, '\\')
if r <= math.MaxUint16 {
out = append(out, 'u')
@@ -168,7 +166,7 @@ func appendString(out []byte, in string, outputASCII bool) []byte {
// escaping. If no characters need escaping, this returns the input length.
func indexNeedEscapeInString(s string) int {
for i := 0; i < len(s); i++ {
- if c := s[i]; c < ' ' || c == '"' || c == '\'' || c == '\\' || c >= utf8.RuneSelf {
+ if c := s[i]; c < ' ' || c == '"' || c == '\'' || c == '\\' || c >= 0x7f {
return i
}
}