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

Function SetDefaultNameProvider

options.go:33–42  ·  view source on GitHub ↗

SetDefaultNameProvider sets the [NameProvider] as a package-level default. By default, the default provider is [jsonname.DefaultJSONNameProvider]. It is safe to call concurrently with [Pointer.Get], [Pointer.Set], [GetForToken] and [SetForToken]. The typical usage is to call it once at initializat

(provider NameProvider)

Source from the content-addressed store, hash-verified

31//
32// A nil provider is ignored.
33func SetDefaultNameProvider(provider NameProvider) {
34 if provider == nil {
35 return
36 }
37
38 defaultOptionsMu.Lock()
39 defer defaultOptionsMu.Unlock()
40
41 defaultOptions.provider = provider
42}
43
44// UseGoNameProvider sets the [NameProvider] as a package-level default to the alternative provider
45// [jsonname.GoNameProvider], that covers a few areas not supported by the default name provider.

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…