Skip to content

Commit

Permalink
Changing opa cli flag descriptions to match online docs
Browse files Browse the repository at this point in the history
- Changed the data flag description to specify that it can take policy
or data files
- Suffixed some descriptions with "This flag can be repeated." where
applicable

Fixes: #2586
Signed-off-by: Alan Silva <alansq16@gmail.com>
  • Loading branch information
OmegaVVeapon authored and tsandall committed Aug 6, 2020
1 parent db20cb5 commit b51e4f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func init() {
}

depsCommand.Flags().VarP(params.format, "format", "f", "set output format")
depsCommand.Flags().VarP(&params.dataPaths, "data", "d", "set data file(s) or directory path(s)")
depsCommand.Flags().VarP(&params.bundlePaths, "bundle", "b", "set bundle file(s) or directory path(s)")
depsCommand.Flags().VarP(&params.dataPaths, "data", "d", "set policy or data file(s). This flag can be repeated.")
depsCommand.Flags().VarP(&params.bundlePaths, "bundle", "b", "set bundle file(s) or directory path(s). This flag can be repeated.")
addIgnoreFlag(depsCommand.Flags(), &params.ignore)

RootCommand.AddCommand(depsCommand)
Expand Down
6 changes: 3 additions & 3 deletions cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ func addFailFlag(fs *pflag.FlagSet, fail *bool, value bool) {
}

func addDataFlag(fs *pflag.FlagSet, paths *repeatedStringFlag) {
fs.VarP(paths, "data", "d", "set data file(s) or directory path(s)")
fs.VarP(paths, "data", "d", "set policy or data file(s). This flag can be repeated.")
}

func addBundleFlag(fs *pflag.FlagSet, paths *repeatedStringFlag) {
fs.VarP(paths, "bundle", "b", "set bundle file(s) or directory path(s)")
fs.VarP(paths, "bundle", "b", "set bundle file(s) or directory path(s). This flag can be repeated.")
}

func addBundleModeFlag(fs *pflag.FlagSet, bundle *bool, value bool) {
Expand All @@ -47,7 +47,7 @@ func addInputFlag(fs *pflag.FlagSet, inputPath *string) {
}

func addImportFlag(fs *pflag.FlagSet, imports *repeatedStringFlag) {
fs.VarP(imports, "import", "", "set query import(s)")
fs.VarP(imports, "import", "", "set query import(s). This flag can be repeated.")
}

func addPackageFlag(fs *pflag.FlagSet, pkg *string) {
Expand Down

0 comments on commit b51e4f7

Please sign in to comment.