refactor(v2/secret): remove deprecated NewClient constructor

What

Removes secret.NewClient from the v2 API.

Why

NewClient was already marked // Deprecated: Use New or NewWithConfig instead. The v1→v2 boundary is the right place to remove it: v2 has no backward-compatibility constraints with v1, and keeping a deprecated symbol in the API adds noise for every consumer reading the docs or using autocomplete.

New() and NewWithConfig() cover all use cases:

Before After
secret.NewClient(nil) secret.New()
secret.NewClient(p) secret.NewWithConfig(&secret.Config{Provider: p})

Changes

  • secret.go — remove NewClient function
  • doc.go — update examples to use New / NewWithConfig; expand the basic usage example to also show NewFileProvider
  • secret_test.go — remove TestNewClient_nilProviderDefaults (covered by TestNew_defaultsToEnvProvider); migrate remaining NewClient calls to NewWithConfig

Merge request reports

Loading