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

Function importPath

cmd/go-post/fix.go:303–309  ·  view source on GitHub ↗

importPath returns the unquoted import path of s, or "" if the path is not properly quoted.

(s *ast.ImportSpec)

Source from the content-addressed store, hash-verified

301// importPath returns the unquoted import path of s,
302// or "" if the path is not properly quoted.
303func importPath(s *ast.ImportSpec) string {
304 t, err := strconv.Unquote(s.Path.Value)
305 if err == nil {
306 return t
307 }
308 return ""
309}
310
311// declImports reports whether gen contains an import of path.
312func declImports(gen *ast.GenDecl, path string) bool {

Callers 5

importSpecFunction · 0.85
declImportsFunction · 0.85
renameTopFunction · 0.85
addImportFunction · 0.85
rewriteImportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected