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

Method GoImports

pkg/codegen/codegen.go:94–103  ·  view source on GitHub ↗

GoImports returns a slice of go import statements

()

Source from the content-addressed store, hash-verified

92
93// GoImports returns a slice of go import statements
94func (im importMap) GoImports() []string {
95 goImports := make([]string, 0, len(im))
96 for _, v := range im {
97 if v.Path == importMappingCurrentPackage {
98 continue
99 }
100 goImports = append(goImports, v.String())
101 }
102 return goImports
103}
104
105func constructImportMapping(importMapping map[string]string) importMap {
106 var (

Callers 1

GenerateFunction · 0.80

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected