Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBuildTag ¶
ParseBuildTag parse `// +build ...` on a first line of *ast.File
func UsesImport ¶
func UsesImport(f *ast.File, packageImports PackageImports, importPath string) bool
UsesImport is for analyze if the import dependency is in use
Types ¶
type PackageImports ¶
PackageImports is map of imports with their package names
func LoadPackageDependencies ¶
func LoadPackageDependencies(dir, buildTag string) (PackageImports, error)
LoadPackageDependencies will return all package's imports with it names:
key - package(ex.: github/pkg/errors), value - name(ex.: errors)
Click to show internal directories.
Click to hide internal directories.