MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / extractGoNameOverride

Function extractGoNameOverride

pkg/codegen/gather.go:328–338  ·  view source on GitHub ↗

extractGoNameOverride reads the x-go-name extension from extensions and returns its value, or "" if not present or invalid.

(extensions map[string]any)

Source from the content-addressed store, hash-verified

326// extractGoNameOverride reads the x-go-name extension from extensions and
327// returns its value, or "" if not present or invalid.
328func extractGoNameOverride(extensions map[string]any) string {
329 ext, ok := extensions[extGoName]
330 if !ok {
331 return ""
332 }
333 name, err := extTypeName(ext)
334 if err != nil {
335 return ""
336 }
337 return name
338}

Callers 5

gatherComponentSchemasFunction · 0.85
gatherComponentResponsesFunction · 0.85
gatherComponentHeadersFunction · 0.85

Calls 1

extTypeNameFunction · 0.85

Tested by

no test coverage detected