func (f *useFinder) visitImportSpec(spec *ast.ImportSpec) ast.Visitor {
	path, _ := strconv.Unquote(spec.Path.Value)
	if path == f.target.pkg.Path() {
		debugf("found import of pkg %v", path)
		if spec.Name != nil {
			debugf("pkg alias used: %v", spec.Name.Name)
			f.queryPkgLocalName = spec.Name.Name
		} else {
			debugf("no pkg alias used: %v", f.target.pkg.Name())
			f.queryPkgLocalName = f.target.pkg.Name()
		}
	}
	return nil
}
// visitImportSpec sets f.queryPkgLocalName if spec refers to f.queryPkg.
// Otherwise, it does nothing. It always returns nil.
visitImportSpec sets f.queryPkgLocalName if spec refers to f.queryPkg.
Otherwise, it does nothing. It always returns nil.
// visitImportSpec sets f . queryPkgLocalName if spec refers to f . queryPkg . // Otherwise it does nothing . It always returns nil .
func (f *useFinder) visitImportSpec(spec *ast.ImportSpec) ast.Visitor {
	path, _ := strconv.Unquote(spec.Path.Value)
	if path == f.target.pkg.Path() {
		debugf("found import of pkg %v", path)
		if spec.Name != nil {
			debugf("pkg alias used: %v", spec.Name.Name)
			f.queryPkgLocalName = spec.Name.Name
		} else {
			debugf("no pkg alias used: %v", f.target.pkg.Name())
			f.queryPkgLocalName = f.target.pkg.Name()
		}
	}
	return nil
}
func ( f * useFinder ) visitImportSpec ( spec * ast . ImportSpec ) ast . Visitor { path , _ := strconv . Unquote ( spec . Path . Value ) if path == f . target . pkg . Path ( ) { debugf ( " " , path ) if spec . Name != nil { debugf ( " " , spec . Name . Name ) f . queryPkgLocalName = spec . Name . Name } else { debugf ( " " , f . target . pkg . Name ( ) ) f . queryPkgLocalName = f . target . pkg . Name ( ) } } return nil }
visitImportSpec sets f.queryPkgLocalName if spec refers to f.queryPkg.
visitImportSpec sets f . queryPkgLocalName if spec refers to f . queryPkg .