From 0cb4f3ecdc80c1ddf0deef3f4ca1592950c68008 Mon Sep 17 00:00:00 2001 From: Alexandre Couedelo Date: Thu, 24 Oct 2024 18:57:07 +0100 Subject: [PATCH] fix: revert bad renaming Signed-off-by: Alexandre Couedelo --- go.mod | 3 --- internal/commands/document.go | 2 +- internal/commands/pull.go | 2 +- internal/commands/test.go | 4 ++-- internal/commands/verify.go | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 2172568b9e..a12f45a61f 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,6 @@ require ( github.com/spdx/tools-golang v0.5.5 github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.18.2 - github.com/stretchr/testify v1.9.0 github.com/subosito/gotenv v1.6.0 github.com/tmccombs/hcl2json v0.3.1 golang.org/x/exp v0.0.0-20231006140011-7918f672742d @@ -57,7 +56,6 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/containerd/typeurl/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -89,7 +87,6 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect diff --git a/internal/commands/document.go b/internal/commands/document.go index 1b6b841f38..92b48fd2a6 100644 --- a/internal/commands/document.go +++ b/internal/commands/document.go @@ -65,7 +65,7 @@ func NewDocumentCommand() *cobra.Command { }, } - cmd.Flags().StringP("outDir", "o", ".", "RegoPackageName to the output documentation file") + cmd.Flags().StringP("outDir", "o", ".", "Path to the output documentation file") cmd.Flags().StringP("template", "t", "", "Go template for the document generation") return cmd diff --git a/internal/commands/pull.go b/internal/commands/pull.go index cef5eba51d..e8751247c6 100644 --- a/internal/commands/pull.go +++ b/internal/commands/pull.go @@ -76,7 +76,7 @@ func NewPullCommand(ctx context.Context) *cobra.Command { }, } - cmd.Flags().StringP("policy", "p", "policy", "RegoPackageName to download the policies to") + cmd.Flags().StringP("policy", "p", "policy", "Path to download the policies to") cmd.Flags().BoolP("tls", "s", true, "Use TLS to access the registry") return &cmd diff --git a/internal/commands/test.go b/internal/commands/test.go index 313a8349e5..d55ab62ae2 100644 --- a/internal/commands/test.go +++ b/internal/commands/test.go @@ -175,12 +175,12 @@ func NewTestCommand(ctx context.Context) *cobra.Command { cmd.Flags().String("ignore", "", "A regex pattern which can be used for ignoring paths") cmd.Flags().String("parser", "", fmt.Sprintf("Parser to use to parse the configurations. Valid parsers: %s", parser.Parsers())) - cmd.Flags().String("capabilities", "", "RegoPackageName to JSON file that can restrict opa functionality against a given policy. Default: all operations allowed") + cmd.Flags().String("capabilities", "", "Path to JSON file that can restrict opa functionality against a given policy. Default: all operations allowed") cmd.Flags().StringP("output", "o", output.OutputStandard, fmt.Sprintf("Output format for conftest results - valid options are: %s", output.Outputs())) cmd.Flags().Bool("junit-hide-message", false, "Do not include the violation message in the JUnit test name") - cmd.Flags().StringSliceP("policy", "p", []string{"policy"}, "RegoPackageName to the Rego policy files directory") + cmd.Flags().StringSliceP("policy", "p", []string{"policy"}, "Path to the Rego policy files directory") cmd.Flags().StringSliceP("update", "u", []string{}, "A list of URLs can be provided to the update flag, which will download before the tests run") cmd.Flags().StringSliceP("namespace", "n", []string{"main"}, "Test policies in a specific namespace") cmd.Flags().StringSliceP("data", "d", []string{}, "A list of paths from which data for the rego policies will be recursively loaded") diff --git a/internal/commands/verify.go b/internal/commands/verify.go index b7b6473154..4bff3f96fa 100644 --- a/internal/commands/verify.go +++ b/internal/commands/verify.go @@ -143,9 +143,9 @@ func NewVerifyCommand(ctx context.Context) *cobra.Command { cmd.Flags().StringP("output", "o", output.OutputStandard, fmt.Sprintf("Output format for conftest results - valid options are: %s", output.Outputs())) cmd.Flags().Bool("junit-hide-message", false, "Do not include the violation message in the JUnit test name") - cmd.Flags().String("capabilities", "", "RegoPackageName to JSON file that can restrict opa functionality against a given policy. Default: all operations allowed") + cmd.Flags().String("capabilities", "", "Path to JSON file that can restrict opa functionality against a given policy. Default: all operations allowed") cmd.Flags().StringSliceP("data", "d", []string{}, "A list of paths from which data for the rego policies will be recursively loaded") - cmd.Flags().StringSliceP("policy", "p", []string{"policy"}, "RegoPackageName to the Rego policy files directory") + cmd.Flags().StringSliceP("policy", "p", []string{"policy"}, "Path to the Rego policy files directory") cmd.Flags().StringSlice("proto-file-dirs", []string{}, "A list of directories containing Protocol Buffer definitions")