MCPcopy Create free account
hub / github.com/decomp/decomp / importSpec

Function importSpec

cmd/go-post/fix.go:292–299  ·  view source on GitHub ↗

importSpec returns the import spec if f imports path, or nil otherwise.

(f *ast.File, path string)

Source from the content-addressed store, hash-verified

290// importSpec returns the import spec if f imports path,
291// or nil otherwise.
292func importSpec(f *ast.File, path string) *ast.ImportSpec {
293 for _, s := range f.Imports {
294 if importPath(s) == path {
295 return s
296 }
297 }
298 return nil
299}
300
301// importPath returns the unquoted import path of s,
302// or "" if the path is not properly quoted.

Callers 3

importsFunction · 0.85
deleteImportFunction · 0.85
usesImportFunction · 0.85

Calls 1

importPathFunction · 0.85

Tested by

no test coverage detected