summaryrefslogtreecommitdiffstats
path: root/vendor/github.com
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2020-03-20 10:29:31 -0400
committerGitHub <noreply@github.com>2020-03-20 10:29:31 -0400
commit2fa1078911af920172f5fca73d01d113262ed1bb (patch)
tree62f6c14ea1662f3d507022d069447307debd70d3 /vendor/github.com
parente5a008f7b2298977405fdbd806d3fa5ff4fd837e (diff)
downloadgitea-2fa1078911af920172f5fca73d01d113262ed1bb.tar.gz
gitea-2fa1078911af920172f5fca73d01d113262ed1bb.zip
go 1.14 (#10467)
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/golang/protobuf/proto/lib.go2
-rw-r--r--vendor/github.com/golang/protobuf/proto/text.go6
-rw-r--r--vendor/github.com/tinylib/msgp/msgp/extension.go4
-rw-r--r--vendor/github.com/tinylib/msgp/msgp/read_bytes.go4
4 files changed, 9 insertions, 7 deletions
diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go
index fdd328bb7f..70fbda5329 100644
--- a/vendor/github.com/golang/protobuf/proto/lib.go
+++ b/vendor/github.com/golang/protobuf/proto/lib.go
@@ -393,7 +393,7 @@ func (p *Buffer) Bytes() []byte { return p.buf }
// than relying on this API.
//
// If deterministic serialization is requested, map entries will be sorted
-// by keys in lexographical order. This is an implementation detail and
+// by keys in lexicographical order. This is an implementation detail and
// subject to change.
func (p *Buffer) SetDeterministic(deterministic bool) {
p.deterministic = deterministic
diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go
index 1aaee725b4..d97f9b3563 100644
--- a/vendor/github.com/golang/protobuf/proto/text.go
+++ b/vendor/github.com/golang/protobuf/proto/text.go
@@ -456,6 +456,8 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
return nil
}
+var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
+
// writeAny writes an arbitrary field.
func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error {
v = reflect.Indirect(v)
@@ -519,8 +521,8 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert
// mutating this value.
v = v.Addr()
}
- if etm, ok := v.Interface().(encoding.TextMarshaler); ok {
- text, err := etm.MarshalText()
+ if v.Type().Implements(textMarshalerType) {
+ text, err := v.Interface().(encoding.TextMarshaler).MarshalText()
if err != nil {
return err
}
diff --git a/vendor/github.com/tinylib/msgp/msgp/extension.go b/vendor/github.com/tinylib/msgp/msgp/extension.go
index 0b31dcdb7b..b2e110851b 100644
--- a/vendor/github.com/tinylib/msgp/msgp/extension.go
+++ b/vendor/github.com/tinylib/msgp/msgp/extension.go
@@ -474,8 +474,8 @@ func AppendExtension(b []byte, e Extension) ([]byte, error) {
// and returns any remaining bytes.
// Possible errors:
// - ErrShortBytes ('b' not long enough)
-// - ExtensionTypeErorr{} (wire type not the same as e.Type())
-// - TypeErorr{} (next object not an extension)
+// - ExtensionTypeError{} (wire type not the same as e.Type())
+// - TypeError{} (next object not an extension)
// - InvalidPrefixError
// - An umarshal error returned from e.UnmarshalBinary
func ReadExtensionBytes(b []byte, e Extension) ([]byte, error) {
diff --git a/vendor/github.com/tinylib/msgp/msgp/read_bytes.go b/vendor/github.com/tinylib/msgp/msgp/read_bytes.go
index f53f84d013..e419975782 100644
--- a/vendor/github.com/tinylib/msgp/msgp/read_bytes.go
+++ b/vendor/github.com/tinylib/msgp/msgp/read_bytes.go
@@ -201,14 +201,14 @@ func ReadMapHeaderBytes(b []byte) (sz uint32, o []byte, err error) {
// - ErrShortBytes (too few bytes)
// - TypeError{} (not a str or bin)
func ReadMapKeyZC(b []byte) ([]byte, []byte, error) {
- o, b, err := ReadStringZC(b)
+ o, x, err := ReadStringZC(b)
if err != nil {
if tperr, ok := err.(TypeError); ok && tperr.Encoded == BinType {
return ReadBytesZC(b)
}
return nil, b, err
}
- return o, b, nil
+ return o, x, nil
}
// ReadArrayHeaderBytes attempts to read