Skip to content

doc: UnsupportedRemoteProviderError claims only etcd and Consul are supported - #2163

Open
ump45nose wants to merge 1 commit into
spf13:masterfrom
ump45nose:fix-unsupported-remote-provider-doc
Open

ump45nose wants to merge 1 commit into
spf13:masterfrom
ump45nose:fix-unsupported-remote-provider-doc

Conversation

@ump45nose

Copy link
Copy Markdown

Overview:

The doc comment on the exported UnsupportedRemoteProviderError type says "Currently only etcd and Consul are supported." That's stale: Viper supports five providers.

What problem does it solve?:

remote.go:12 defines SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "firestore", "nats"}, and AddRemoteProvider (lines 86, 100) validates against it and already documents all five. The UnsupportedRemoteProviderError comment is the only remaining place asserting the old two-provider set, so it directly contradicts the code it describes. I changed it to point at SupportedRemoteProviders as the source of truth and list the current five, so it can't silently go stale again.

Comment-only; no behavior change.

Special notes for a reviewer:

  • gofmt -l remote.go — clean
  • go build ./... / go vet ./... — clean
  • go test -count=1 ./... — all packages pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant