importPath returns the unquoted import path of s, or "" if the path is not properly quoted.
(s *ast.ImportSpec)
| 301 | // importPath returns the unquoted import path of s, |
| 302 | // or "" if the path is not properly quoted. |
| 303 | func 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. |
| 312 | func declImports(gen *ast.GenDecl, path string) bool { |
no outgoing calls
no test coverage detected