diff --git a/README.md b/README.md index 2d6e77c..aa24323 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ goda graph "github.com/loov/goda/..." | dot -Tsvg -o graph.svg goda graph -cluster -short "github.com/loov/goda:all" | dot -Tsvg -o graph.svg # list direct dependencies of github.com/loov/goda -goda list "github.com/loov/goda/...:imports" +goda list "github.com/loov/goda/...:import" # list dependency graph that reaches flag package, including std goda graph -std "reach(github.com/loov/goda/...:all, flag)" | dot -Tsvg -o graph.svg @@ -52,10 +52,10 @@ The basic syntax is that you can specify multiple packages: goda list github.com/loov/goda/... github.com/loov/qloc ``` -By default it will select all the specific packages. You can select the package dependencies with `:imports` and both of them with `:all`: +By default it will select all the specific packages. You can select the package dependencies with `:import` and both of them with `:all`: ``` -goda list github.com/loov/goda/...:imports:all +goda list github.com/loov/goda/...:import:all goda list github.com/loov/goda/...:all ``` diff --git a/internal/pkgset/calc.go b/internal/pkgset/calc.go index f29798d..7ec3f0b 100644 --- a/internal/pkgset/calc.go +++ b/internal/pkgset/calc.go @@ -152,7 +152,7 @@ func Calc(parentContext context.Context, expr []string) (Set, error) { } return NewAll(set), nil - case "imports", "imps": + case "import", "imp": set, err := eval(ctx, e.Expr) if err != nil { return nil, err diff --git a/main.go b/main.go index 9734fb4..3cb1ed7 100644 --- a/main.go +++ b/main.go @@ -66,9 +66,9 @@ package expressions. X:all select X and all of its direct and indirect dependencies - X:imports, X:imps - select direct imports of X - X:imports:all, X:imps:all + X:import, X:imp + select direct import of X + X:import:all, X:imp:all select direct and indirect dependencies of X; X not included X:source @@ -104,7 +104,7 @@ package expressions. # Example expressions - github.com/loov/goda:imports + github.com/loov/goda:import all direct dependencies for "github.com/loov/goda" package shared(github.com/loov/goda/pkgset:all, github.com/loov/goda/templates:all)