MCPcopy Index your code
hub / github.com/go-openapi/jsonpointer / UseGoNameProvider

Function UseGoNameProvider

options.go:53–55  ·  view source on GitHub ↗

UseGoNameProvider sets the [NameProvider] as a package-level default to the alternative provider [jsonname.GoNameProvider], that covers a few areas not supported by the default name provider. This implementation supports untagged exported fields and embedded types in go struct. It follows strictly

()

Source from the content-addressed store, hash-verified

51// [SetForToken].
52// The typical usage is to call it once at initialization time.
53func UseGoNameProvider() {
54 SetDefaultNameProvider(jsonname.NewGoNameProvider())
55}
56
57// DefaultNameProvider returns the current package-level [NameProvider].
58func DefaultNameProvider() NameProvider { //nolint:ireturn // returning the interface is the point — callers pick their own implementation.

Calls 2

NewGoNameProviderFunction · 0.92
SetDefaultNameProviderFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…