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

Struct stubNameProvider

options_test.go:19–24  ·  view source on GitHub ↗

stubNameProvider is a NameProvider that maps JSON names to Go field names via a fixed dictionary. It lets tests observe which provider was used by the resolver without relying on the default reflection-based behavior.

Source from the content-addressed store, hash-verified

17// It lets tests observe which provider was used by the resolver without relying on the default
18// reflection-based behavior.
19type stubNameProvider struct {
20 mu sync.Mutex
21 mapping map[string]string
22 lookups []string
23 forTypes []string
24}
25
26func (s *stubNameProvider) GetGoName(_ any, name string) (string, bool) {
27 s.record(name, false)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected