mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 14:37:28 -04:00 
			
		
		
		
	[Vendor] Update directly used dependencys (#15593)
* update github.com/blevesearch/bleve v2.0.2 -> v2.0.3 * github.com/denisenkom/go-mssqldb v0.9.0 -> v0.10.0 * github.com/editorconfig/editorconfig-core-go v2.4.1 -> v2.4.2 * github.com/go-chi/cors v1.1.1 -> v1.2.0 * github.com/go-git/go-billy v5.0.0 -> v5.1.0 * github.com/go-git/go-git v5.2.0 -> v5.3.0 * github.com/go-ldap/ldap v3.2.4 -> v3.3.0 * github.com/go-redis/redis v8.6.0 -> v8.8.2 * github.com/go-sql-driver/mysql v1.5.0 -> v1.6.0 * github.com/go-swagger/go-swagger v0.26.1 -> v0.27.0 * github.com/lib/pq v1.9.0 -> v1.10.1 * github.com/mattn/go-sqlite3 v1.14.6 -> v1.14.7 * github.com/go-testfixtures/testfixtures v3.5.0 -> v3.6.0 * github.com/issue9/identicon v1.0.1 -> v1.2.0 * github.com/klauspost/compress v1.11.8 -> v1.12.1 * github.com/mgechev/revive v1.0.3 -> v1.0.6 * github.com/microcosm-cc/bluemonday v1.0.7 -> v1.0.8 * github.com/niklasfasching/go-org v1.4.0 -> v1.5.0 * github.com/olivere/elastic v7.0.22 -> v7.0.24 * github.com/pelletier/go-toml v1.8.1 -> v1.9.0 * github.com/prometheus/client_golang v1.9.0 -> v1.10.0 * github.com/xanzy/go-gitlab v0.44.0 -> v0.48.0 * github.com/yuin/goldmark v1.3.3 -> v1.3.5 * github.com/6543/go-version v1.2.4 -> v1.3.1 * do github.com/lib/pq v1.10.0 -> v1.10.1 again ...
This commit is contained in:
		
							
								
								
									
										68
									
								
								vendor/google.golang.org/protobuf/internal/impl/codec_message.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										68
									
								
								vendor/google.golang.org/protobuf/internal/impl/codec_message.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -11,7 +11,7 @@ import ( | ||||
|  | ||||
| 	"google.golang.org/protobuf/encoding/protowire" | ||||
| 	"google.golang.org/protobuf/internal/encoding/messageset" | ||||
| 	"google.golang.org/protobuf/internal/fieldsort" | ||||
| 	"google.golang.org/protobuf/internal/order" | ||||
| 	pref "google.golang.org/protobuf/reflect/protoreflect" | ||||
| 	piface "google.golang.org/protobuf/runtime/protoiface" | ||||
| ) | ||||
| @@ -27,6 +27,7 @@ type coderMessageInfo struct { | ||||
| 	coderFields        map[protowire.Number]*coderFieldInfo | ||||
| 	sizecacheOffset    offset | ||||
| 	unknownOffset      offset | ||||
| 	unknownPtrKind     bool | ||||
| 	extensionOffset    offset | ||||
| 	needsInitCheck     bool | ||||
| 	isMessageSet       bool | ||||
| @@ -47,9 +48,20 @@ type coderFieldInfo struct { | ||||
| } | ||||
|  | ||||
| func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { | ||||
| 	mi.sizecacheOffset = si.sizecacheOffset | ||||
| 	mi.unknownOffset = si.unknownOffset | ||||
| 	mi.extensionOffset = si.extensionOffset | ||||
| 	mi.sizecacheOffset = invalidOffset | ||||
| 	mi.unknownOffset = invalidOffset | ||||
| 	mi.extensionOffset = invalidOffset | ||||
|  | ||||
| 	if si.sizecacheOffset.IsValid() && si.sizecacheType == sizecacheType { | ||||
| 		mi.sizecacheOffset = si.sizecacheOffset | ||||
| 	} | ||||
| 	if si.unknownOffset.IsValid() && (si.unknownType == unknownFieldsAType || si.unknownType == unknownFieldsBType) { | ||||
| 		mi.unknownOffset = si.unknownOffset | ||||
| 		mi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr | ||||
| 	} | ||||
| 	if si.extensionOffset.IsValid() && si.extensionType == extensionFieldsType { | ||||
| 		mi.extensionOffset = si.extensionOffset | ||||
| 	} | ||||
|  | ||||
| 	mi.coderFields = make(map[protowire.Number]*coderFieldInfo) | ||||
| 	fields := mi.Desc.Fields() | ||||
| @@ -73,6 +85,27 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { | ||||
| 		var funcs pointerCoderFuncs | ||||
| 		var childMessage *MessageInfo | ||||
| 		switch { | ||||
| 		case ft == nil: | ||||
| 			// This never occurs for generated message types. | ||||
| 			// It implies that a hand-crafted type has missing Go fields | ||||
| 			// for specific protobuf message fields. | ||||
| 			funcs = pointerCoderFuncs{ | ||||
| 				size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { | ||||
| 					return 0 | ||||
| 				}, | ||||
| 				marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { | ||||
| 					return nil, nil | ||||
| 				}, | ||||
| 				unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { | ||||
| 					panic("missing Go struct field for " + string(fd.FullName())) | ||||
| 				}, | ||||
| 				isInit: func(p pointer, f *coderFieldInfo) error { | ||||
| 					panic("missing Go struct field for " + string(fd.FullName())) | ||||
| 				}, | ||||
| 				merge: func(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { | ||||
| 					panic("missing Go struct field for " + string(fd.FullName())) | ||||
| 				}, | ||||
| 			} | ||||
| 		case isOneof: | ||||
| 			fieldOffset = offsetOf(fs, mi.Exporter) | ||||
| 		case fd.IsWeak(): | ||||
| @@ -136,7 +169,7 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { | ||||
| 		sort.Slice(mi.orderedCoderFields, func(i, j int) bool { | ||||
| 			fi := fields.ByNumber(mi.orderedCoderFields[i].num) | ||||
| 			fj := fields.ByNumber(mi.orderedCoderFields[j].num) | ||||
| 			return fieldsort.Less(fi, fj) | ||||
| 			return order.LegacyFieldOrder(fi, fj) | ||||
| 		}) | ||||
| 	} | ||||
|  | ||||
| @@ -157,3 +190,28 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { | ||||
| 		mi.methods.Merge = mi.merge | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // getUnknownBytes returns a *[]byte for the unknown fields. | ||||
| // It is the caller's responsibility to check whether the pointer is nil. | ||||
| // This function is specially designed to be inlineable. | ||||
| func (mi *MessageInfo) getUnknownBytes(p pointer) *[]byte { | ||||
| 	if mi.unknownPtrKind { | ||||
| 		return *p.Apply(mi.unknownOffset).BytesPtr() | ||||
| 	} else { | ||||
| 		return p.Apply(mi.unknownOffset).Bytes() | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // mutableUnknownBytes returns a *[]byte for the unknown fields. | ||||
| // The returned pointer is guaranteed to not be nil. | ||||
| func (mi *MessageInfo) mutableUnknownBytes(p pointer) *[]byte { | ||||
| 	if mi.unknownPtrKind { | ||||
| 		bp := p.Apply(mi.unknownOffset).BytesPtr() | ||||
| 		if *bp == nil { | ||||
| 			*bp = new([]byte) | ||||
| 		} | ||||
| 		return *bp | ||||
| 	} else { | ||||
| 		return p.Apply(mi.unknownOffset).Bytes() | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user