Skip to content

Commit

Permalink
use options
Browse files Browse the repository at this point in the history
  • Loading branch information
goddenrich committed Apr 8, 2024
1 parent ca78aca commit 98b1e23
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cmd/puku/puku.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ var opts = struct {
} `positional-args:"true"`
} `command:"fmt" description:"Format build files in the provided paths"`
Sync struct {
Format outputFormat `short:"f" long:"format" default:"text" description:"output format of the linter"`
Write bool `short:"w" long:"write" description:"Whether to write the files back or just print them to stdout"`
Format string `short:"f" long:"format" choice:"json" choice:"text" default:"text" description:"output format when outputting to stdout"`

Check failure on line 47 in cmd/puku/puku.go

View workflow job for this annotation

GitHub Actions / lint

SA5008: duplicate struct tag "choice" (staticcheck)
Write bool `short:"w" long:"write" description:"Whether to write the files back or just print them to stdout"`
} `command:"sync" description:"Synchronises the go.mod to the third party build file"`
Lint struct {
Format outputFormat `short:"f" long:"format" default:"text" description:"output format of the linter"`
Format string `short:"f" long:"format" choice:"json" choice:"text" default:"text" description:"output format when outputting to stdout"`

Check failure on line 51 in cmd/puku/puku.go

View workflow job for this annotation

GitHub Actions / lint

SA5008: duplicate struct tag "choice" (staticcheck)
Args struct {
Paths []string `positional-arg-name:"packages" description:"The packages to process"`
} `positional-args:"true"`
Expand All @@ -59,18 +59,18 @@ var opts = struct {
} `positional-args:"true"`
} `command:"watch" description:"Watch build files in the provided paths and update them when needed"`
Migrate struct {
Write bool `short:"w" long:"write" description:"Whether to write the files back or just print them to stdout"`
Format outputFormat `short:"f" long:"format" default:"text" description:"output format of the linter"`
ThirdPartyDirs []string `long:"third_party_dir" description:"Directories to find go_module rules to migrate"`
UpdateGoMod bool `short:"g" long:"update_go_mod" description:"Update the go mod with the module(s) being migrated"`
Write bool `short:"w" long:"write" description:"Whether to write the files back or just print them to stdout"`
Format string `short:"f" long:"format" choice:"json" choice:"text" default:"text" description:"output format when outputting to stdout"`
ThirdPartyDirs []string `long:"third_party_dir" description:"Directories to find go_module rules to migrate"`
UpdateGoMod bool `short:"g" long:"update_go_mod" description:"Update the go mod with the module(s) being migrated"`
Args struct {
Modules []string `positional-arg-name:"modules" description:"The modules to migrate to go_repo"`
} `positional-args:"true"`
} `command:"migrate" description:"Migrates from go_module to go_repo"`
Licenses struct {
Update struct {
Format outputFormat `short:"f" long:"format" default:"text" description:"output format of the linter"`
Write bool `short:"w" long:"write" description:"Whether to write the files back or just print them to stdout"`
Format string `short:"f" long:"format" choice:"json" choice:"text" default:"text" description:"output format when outputting to stdout"`
Write bool `short:"w" long:"write" description:"Whether to write the files back or just print them to stdout"`
Args struct {
Paths []string `positional-arg-name:"packages" description:"The packages to process"`
} `positional-args:"true"`
Expand Down

0 comments on commit 98b1e23

Please sign in to comment.