Skip to content

Commit

Permalink
pkgset: rename to :import
Browse files Browse the repository at this point in the history
  • Loading branch information
egonelbre committed Mar 24, 2021
1 parent 3c2a6ee commit cfd8489
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion internal/pkgset/calc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cfd8489

Please sign in to comment.