MCPcopy Create free account
hub / github.com/nsf/gocode / path_and_alias

Function path_and_alias

declcache.go:167–178  ·  view source on GitHub ↗
(imp *ast.ImportSpec)

Source from the content-addressed store, hash-verified

165}
166
167func path_and_alias(imp *ast.ImportSpec) (string, string) {
168 path := ""
169 if imp.Path != nil && len(imp.Path.Value) > 0 {
170 path = string(imp.Path.Value)
171 path = path[1 : len(path)-1]
172 }
173 alias := ""
174 if imp.Name != nil {
175 alias = imp.Name.Name
176 }
177 return path, alias
178}
179
180func find_go_dag_package(imp, filedir string) (string, bool) {
181 // Support godag directory structure

Callers 1

collect_package_importsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected