aboutsummaryrefslogtreecommitdiff
path: root/reflect/protoregistry/registry.go
diff options
context:
space:
mode:
Diffstat (limited to 'reflect/protoregistry/registry.go')
-rw-r--r--reflect/protoregistry/registry.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/reflect/protoregistry/registry.go b/reflect/protoregistry/registry.go
index 59f024c4..aeb55977 100644
--- a/reflect/protoregistry/registry.go
+++ b/reflect/protoregistry/registry.go
@@ -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