mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-10 06:38:18 +08:00
go 1.14 (#10467)
This commit is contained in:
2
vendor/github.com/golang/protobuf/proto/lib.go
generated
vendored
2
vendor/github.com/golang/protobuf/proto/lib.go
generated
vendored
@ -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
|
||||
|
6
vendor/github.com/golang/protobuf/proto/text.go
generated
vendored
6
vendor/github.com/golang/protobuf/proto/text.go
generated
vendored
@ -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
|
||||
}
|
||||
|
4
vendor/github.com/tinylib/msgp/msgp/extension.go
generated
vendored
4
vendor/github.com/tinylib/msgp/msgp/extension.go
generated
vendored
@ -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) {
|
||||
|
4
vendor/github.com/tinylib/msgp/msgp/read_bytes.go
generated
vendored
4
vendor/github.com/tinylib/msgp/msgp/read_bytes.go
generated
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user