aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-05-26 17:53:41 +0700
committerShulhan <ms@kilabit.info>2018-05-26 17:53:41 +0700
commit7add8109ee8012904a5f88effd1aa55d02bd9541 (patch)
tree965f36edbcd670a8847a0e2005dbed6a352d1c50
parentc0b6702db7218e63ca1be16acb7377aea2f1a281 (diff)
downloadbeku-7add8109ee8012904a5f88effd1aa55d02bd9541.tar.xz
package.ScanDeps: use ".Imports" instead of ".Deps"
".Deps" field return all imports recursively. I though it was all imports in current directory and their subdirectory ("./..."), turn out it was imports of imports.
-rw-r--r--package.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/package.go b/package.go
index 58107ea..5713b54 100644
--- a/package.go
+++ b/package.go
@@ -250,7 +250,7 @@ func (pkg *Package) GetRecursiveImports() (
imports []string, err error,
) {
//nolint:gas
- cmd := exec.Command("go", "list", "-e", "-f", `{{ join .Deps "\n"}}`, "./...")
+ cmd := exec.Command("go", "list", "-e", "-f", `{{ join .Imports "\n"}}`, "./...")
if Debug >= DebugL1 {
fmt.Println(">>>", cmd.Args)
}