feat: implement copilot drive mode
This commit is contained in:
		
							
								
								
									
										4
									
								
								vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -30,9 +30,11 @@ import (
 | 
			
		||||
// conflictPolicy configures the policy for handling registration conflicts.
 | 
			
		||||
//
 | 
			
		||||
// It can be over-written at compile time with a linker-initialized variable:
 | 
			
		||||
//
 | 
			
		||||
//	go build -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn"
 | 
			
		||||
//
 | 
			
		||||
// It can be over-written at program execution with an environment variable:
 | 
			
		||||
//
 | 
			
		||||
//	GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn ./main
 | 
			
		||||
//
 | 
			
		||||
// Neither of the above are covered by the compatibility promise and
 | 
			
		||||
@@ -44,7 +46,7 @@ var conflictPolicy = "panic" // "panic" | "warn" | "ignore"
 | 
			
		||||
// It is a variable so that the behavior is easily overridden in another file.
 | 
			
		||||
var ignoreConflict = func(d protoreflect.Descriptor, err error) bool {
 | 
			
		||||
	const env = "GOLANG_PROTOBUF_REGISTRATION_CONFLICT"
 | 
			
		||||
	const faq = "https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict"
 | 
			
		||||
	const faq = "https://protobuf.dev/reference/go/faq#namespace-conflict"
 | 
			
		||||
	policy := conflictPolicy
 | 
			
		||||
	if v := os.Getenv(env); v != "" {
 | 
			
		||||
		policy = v
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user