diff --git a/cmd/artifact/artifact.go b/cmd/artifact/artifact.go index cba37051..cd730ade 100644 --- a/cmd/artifact/artifact.go +++ b/cmd/artifact/artifact.go @@ -37,8 +37,6 @@ func NewArtifactCmd(ctx context.Context, opt *commonoptions.Common) *cobra.Comma DisableFlagsInUseLine: true, Short: "Interact with Falco artifacts", Long: "Interact with Falco artifacts", - SilenceErrors: true, - SilenceUsage: true, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { var indexes []config.Index var indexCache *cache.Cache diff --git a/cmd/artifact/follow/follow.go b/cmd/artifact/follow/follow.go index 92e7a266..a11d2b55 100644 --- a/cmd/artifact/follow/follow.go +++ b/cmd/artifact/follow/follow.go @@ -106,11 +106,9 @@ func NewArtifactFollowCmd(ctx context.Context, opt *options.Common) *cobra.Comma } cmd := &cobra.Command{ - Use: "follow [ref1 [ref2 ...]] [flags]", - Short: "Install a list of artifacts and continuously checks if there are updates", - Long: longFollow, - SilenceErrors: true, - SilenceUsage: true, + Use: "follow [ref1 [ref2 ...]] [flags]", + Short: "Install a list of artifacts and continuously checks if there are updates", + Long: longFollow, PreRunE: func(cmd *cobra.Command, args []string) error { // Override "every" flag with viper config if not set by user. f := cmd.Flags().Lookup("every") diff --git a/cmd/artifact/info/info.go b/cmd/artifact/info/info.go index 4a3c9a16..306626a4 100644 --- a/cmd/artifact/info/info.go +++ b/cmd/artifact/info/info.go @@ -48,8 +48,6 @@ func NewArtifactInfoCmd(ctx context.Context, opt *options.Common) *cobra.Command Short: "Retrieve all available versions of a given artifact", Long: "Retrieve all available versions of a given artifact", Args: cobra.MinimumNArgs(1), - SilenceErrors: true, - SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { return o.RunArtifactInfo(ctx, args) }, diff --git a/cmd/artifact/install/install.go b/cmd/artifact/install/install.go index ff263ac4..044115d2 100644 --- a/cmd/artifact/install/install.go +++ b/cmd/artifact/install/install.go @@ -92,8 +92,6 @@ func NewArtifactInstallCmd(ctx context.Context, opt *options.Common) *cobra.Comm DisableFlagsInUseLine: true, Short: "Install a list of artifacts", Long: longInstall, - SilenceErrors: true, - SilenceUsage: true, PreRunE: func(cmd *cobra.Command, args []string) error { // Override "rulesfiles-dir" flag with viper config if not set by user. f := cmd.Flags().Lookup(FlagRulesFilesDir) diff --git a/cmd/artifact/list/artifact_list.go b/cmd/artifact/list/artifact_list.go index 4d76c0ef..432d7288 100644 --- a/cmd/artifact/list/artifact_list.go +++ b/cmd/artifact/list/artifact_list.go @@ -47,8 +47,6 @@ func NewArtifactListCmd(ctx context.Context, opt *options.Common) *cobra.Command Short: "List all artifacts", Long: "List all artifacts", Aliases: []string{"ls"}, - SilenceErrors: true, - SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { return o.RunArtifactList(ctx, args) }, diff --git a/cmd/artifact/search/artifact_search.go b/cmd/artifact/search/artifact_search.go index efd9a396..d750c2a8 100644 --- a/cmd/artifact/search/artifact_search.go +++ b/cmd/artifact/search/artifact_search.go @@ -58,8 +58,6 @@ func NewArtifactSearchCmd(ctx context.Context, opt *options.Common) *cobra.Comma Short: "Search an artifact by keywords", Long: "Search an artifact by keywords", Args: cobra.MinimumNArgs(1), - SilenceErrors: true, - SilenceUsage: true, PreRunE: func(cmd *cobra.Command, args []string) error { return o.Validate() }, diff --git a/cmd/cli_test.go b/cmd/cli_test.go deleted file mode 100644 index 280b2f46..00000000 --- a/cmd/cli_test.go +++ /dev/null @@ -1,133 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright (C) 2023 The Falco Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cmd - -import ( - "bytes" - "context" - "io" - "os" - "path/filepath" - "strings" - "testing" - - "github.com/acarl005/stripansi" - "gotest.tools/assert" - - "github.com/falcosecurity/falcoctl/pkg/options" -) - -type expect struct { - err string - out string -} - -type testCase struct { - descr string - env map[string]string - args []string - expect expect -} - -var tests = []testCase{ - { - descr: "no-args-no-flags", - args: []string{}, - expect: expect{ - out: "testdata/noargsnoflags.txt", - }, - }, - { - descr: "wrong-flag", - args: []string{"--wrong"}, - expect: expect{ - out: "testdata/wrongflag.txt", - err: "unknown flag: --wrong", - }, - }, - { - args: []string{"help"}, - expect: expect{ - out: "testdata/help.txt", - }, - }, - { - descr: "help-flag", - args: []string{"--help"}, - expect: expect{ - out: "testdata/help.txt", - }, - }, -} - -func run(t *testing.T, test *testCase) { - // Setup - c := New(context.Background(), options.NewOptions()) - o := bytes.NewBufferString("") - c.SetOut(o) - c.SetErr(o) - c.SetArgs(test.args) - for k, v := range test.env { - if err := os.Setenv(k, v); err != nil { - t.Fatalf("error setting env variables: %v", err) - } - } - // Test - err := c.Execute() - if err != nil { - if test.expect.err == "" { - t.Fatalf("error executing CLI: %v", err) - } else { - assert.Error(t, err, test.expect.err) - } - } - - out, err := io.ReadAll(o) - if err != nil { - t.Fatalf("error reading CLI output: %v", err) - } - res := stripansi.Strip(string(out)) - assert.Equal(t, test.expect.out, res) - // Teardown - for k := range test.env { - if err := os.Unsetenv(k); err != nil { - t.Fatalf("error tearing down: %v", err) - } - } -} - -func TestCLI(t *testing.T) { - for _, test := range tests { - descr := test.descr - if descr == "" { - if test.expect.out == "" { - t.Fatal("malformed test case: missing both descr and expect.out fields") - } - test.descr = strings.TrimSuffix(filepath.Base(test.expect.out), ".txt") - } - if test.expect.out != "" { - out, err := os.ReadFile(test.expect.out) - if err != nil { - t.Fatalf("output fixture not found: %v", err) - } - test.expect.out = string(out) - } - - t.Run(test.descr, func(t *testing.T) { - run(t, &test) - }) - } -} diff --git a/cmd/cmd_suite_test.go b/cmd/cmd_suite_test.go new file mode 100644 index 00000000..6cd750a3 --- /dev/null +++ b/cmd/cmd_suite_test.go @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) 2023 The Falco Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cmd_test + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestCmd(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Cmd Suite") +} diff --git a/cmd/index/add/add.go b/cmd/index/add/add.go index 228e22ef..24bc7505 100644 --- a/cmd/index/add/add.go +++ b/cmd/index/add/add.go @@ -43,8 +43,6 @@ func NewIndexAddCmd(ctx context.Context, opt *options.Common) *cobra.Command { Short: "Add an index to the local falcoctl configuration", Long: "Add an index to the local falcoctl configuration. Indexes are used to perform search operations for artifacts", Args: cobra.RangeArgs(2, 3), - SilenceErrors: true, - SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { return o.RunIndexAdd(ctx, args) }, diff --git a/cmd/index/index.go b/cmd/index/index.go index d51d0d56..d24d8fa6 100644 --- a/cmd/index/index.go +++ b/cmd/index/index.go @@ -35,8 +35,6 @@ func NewIndexCmd(ctx context.Context, opt *commonoptions.Common) *cobra.Command DisableFlagsInUseLine: true, Short: "Interact with index", Long: "Interact with index", - SilenceErrors: true, - SilenceUsage: true, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { opt.Initialize() return config.Load(opt.ConfigFile) diff --git a/cmd/index/list/list.go b/cmd/index/list/list.go index 56a4d007..c24296f8 100644 --- a/cmd/index/list/list.go +++ b/cmd/index/list/list.go @@ -43,8 +43,6 @@ func NewIndexListCmd(_ context.Context, opt *options.Common) *cobra.Command { Long: "List all the added indexes that were configured in falcoctl", Args: cobra.ExactArgs(0), Aliases: []string{"ls"}, - SilenceErrors: true, - SilenceUsage: true, RunE: func(cmd *cobra.Command, _ []string) error { return o.RunIndexList() }, diff --git a/cmd/index/remove/remove.go b/cmd/index/remove/remove.go index ce1f9c29..1a906f2e 100644 --- a/cmd/index/remove/remove.go +++ b/cmd/index/remove/remove.go @@ -43,8 +43,6 @@ func NewIndexRemoveCmd(ctx context.Context, opt *options.Common) *cobra.Command Long: "Remove an index from the local falcoctl configuration", Args: cobra.MinimumNArgs(1), Aliases: []string{"rm"}, - SilenceErrors: true, - SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { return o.RunIndexRemove(ctx, args) }, diff --git a/cmd/index/update/update.go b/cmd/index/update/update.go index dd570691..6329ffb5 100644 --- a/cmd/index/update/update.go +++ b/cmd/index/update/update.go @@ -42,7 +42,6 @@ func NewIndexUpdateCmd(ctx context.Context, opt *options.Common) *cobra.Command Short: "Update an existing index", Long: "Update an existing index", Args: cobra.MinimumNArgs(1), - SilenceErrors: true, RunE: func(cmd *cobra.Command, args []string) error { return o.RunIndexUpdate(ctx, args) }, diff --git a/cmd/registry/auth/auth.go b/cmd/registry/auth/auth.go index b3da38e2..b90a2944 100644 --- a/cmd/registry/auth/auth.go +++ b/cmd/registry/auth/auth.go @@ -33,7 +33,6 @@ func NewAuthCmd(ctx context.Context, opt *commonoptions.Common) *cobra.Command { DisableFlagsInUseLine: true, Short: "Handle authentication towards OCI registries", Long: "Handle authentication towards OCI registries", - SilenceErrors: true, } cmd.AddCommand(basic.NewBasicCmd(ctx, opt)) diff --git a/cmd/registry/auth/basic/basic.go b/cmd/registry/auth/basic/basic.go index 86e0c039..7f3c1101 100644 --- a/cmd/registry/auth/basic/basic.go +++ b/cmd/registry/auth/basic/basic.go @@ -45,8 +45,6 @@ func NewBasicCmd(ctx context.Context, opt *options.Common) *cobra.Command { Short: "Login to an OCI registry", Long: "Login to an OCI registry to push and pull artifacts", Args: cobra.ExactArgs(1), - SilenceErrors: true, - SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { return o.RunBasic(ctx, args) }, diff --git a/cmd/registry/auth/gcp/gcp.go b/cmd/registry/auth/gcp/gcp.go index 0f2d332b..cd0521c7 100644 --- a/cmd/registry/auth/gcp/gcp.go +++ b/cmd/registry/auth/gcp/gcp.go @@ -53,8 +53,6 @@ func NewGcpCmd(ctx context.Context, opt *options.Common) *cobra.Command { Short: "Register an Artifact Registry to log in using GCP Application Default credentials", Long: longGcp, Args: cobra.ExactArgs(1), - SilenceErrors: true, - SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { return o.RunGcp(ctx, args) }, diff --git a/cmd/registry/auth/oauth/oauth.go b/cmd/registry/auth/oauth/oauth.go index a36889ab..a03a896b 100644 --- a/cmd/registry/auth/oauth/oauth.go +++ b/cmd/registry/auth/oauth/oauth.go @@ -60,8 +60,6 @@ func NewOauthCmd(ctx context.Context, opt *options.Common) *cobra.Command { Short: "Retrieve access and refresh tokens for OAuth2.0 client credentials flow authentication", Long: longOauth, Args: cobra.ExactArgs(1), - SilenceErrors: true, - SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { return o.RunOAuth(ctx, args) }, diff --git a/cmd/registry/pull/pull.go b/cmd/registry/pull/pull.go index 4fbd1e03..5bf6f904 100644 --- a/cmd/registry/pull/pull.go +++ b/cmd/registry/pull/pull.go @@ -75,8 +75,6 @@ func NewPullCmd(ctx context.Context, opt *options.Common) *cobra.Command { Short: "Pull a Falco OCI artifact from remote registry", Long: longPull, Args: cobra.ExactArgs(1), - SilenceErrors: true, - SilenceUsage: true, PreRunE: func(cmd *cobra.Command, args []string) error { if err := o.Validate(); err != nil { return err diff --git a/cmd/registry/push/push.go b/cmd/registry/push/push.go index ce785d33..f016c6d2 100644 --- a/cmd/registry/push/push.go +++ b/cmd/registry/push/push.go @@ -91,8 +91,6 @@ func NewPushCmd(ctx context.Context, opt *options.Common) *cobra.Command { Short: "Push a Falco OCI artifact to remote registry", Long: longPush, Args: cobra.MinimumNArgs(2), - SilenceErrors: true, - SilenceUsage: true, PreRunE: func(cmd *cobra.Command, args []string) error { if err := o.validate(); err != nil { return err diff --git a/cmd/registry/registry.go b/cmd/registry/registry.go index 30cccc2a..f29dbbf7 100644 --- a/cmd/registry/registry.go +++ b/cmd/registry/registry.go @@ -34,7 +34,6 @@ func NewRegistryCmd(ctx context.Context, opt *commonoptions.Common) *cobra.Comma DisableFlagsInUseLine: true, Short: "Interact with OCI registries", Long: "Interact with OCI registries", - SilenceErrors: true, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { // Initialize the options. opt.Initialize() diff --git a/cmd/root.go b/cmd/root.go index 186f91ca..7a2d6f08 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -48,6 +48,8 @@ func New(ctx context.Context, opt *options.Common) *cobra.Command { Short: "The official CLI tool for working with Falco and its ecosystem components", Long: longRootCmd, SilenceErrors: true, + SilenceUsage: true, + TraverseChildren: true, DisableAutoGenTag: true, PersistentPreRun: func(cmd *cobra.Command, args []string) { // Initialize the common options for all subcommands. diff --git a/cmd/root_test.go b/cmd/root_test.go new file mode 100644 index 00000000..d95cbd5f --- /dev/null +++ b/cmd/root_test.go @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) 2023 The Falco Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cmd_test + +import ( + "context" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "github.com/onsi/gomega/gbytes" + "github.com/spf13/cobra" + + "github.com/falcosecurity/falcoctl/cmd" + commonoptions "github.com/falcosecurity/falcoctl/pkg/options" +) + +var usage = ` + __ _ _ _ + / _| __ _| | ___ ___ ___| |_| | + | |_ / _ | |/ __/ _ \ / __| __| | + | _| (_| | | (_| (_) | (__| |_| | + |_| \__,_|_|\___\___/ \___|\__|_| + + +The official CLI tool for working with Falco and its ecosystem components + +Usage: + falcoctl [command] + +Available Commands: + artifact Interact with Falco artifacts + completion Generate the autocompletion script for the specified shell + help Help about any command + index Interact with index + registry Interact with OCI registries + tls Generate and install TLS material for Falco + version Print the falcoctl version information + +Flags: + --config string config file to be used for falcoctl (default "/etc/falcoctl/falcoctl.yaml") + -h, --help help for falcoctl + --log-format string Set formatting for logs (color, text, json) (default "color") + --log-level string Set level for logs (info, warn, debug, trace) (default "info") + +Use "falcoctl [command] --help" for more information about a command. +` + +var _ = Describe("Root", func() { + var ( + rootCmd *cobra.Command + ctx = context.Background() + opt = commonoptions.NewOptions() + err error + outputBuf = gbytes.NewBuffer() + args []string + ) + + JustBeforeEach(func() { + // Each test creates a new root command, configures, and executes it. + opt.Initialize(commonoptions.WithWriter(outputBuf)) + rootCmd = cmd.New(ctx, opt) + rootCmd.SetOut(outputBuf) + rootCmd.SetErr(outputBuf) + rootCmd.SetArgs(args) + err = cmd.Execute(rootCmd, opt) + }) + + JustAfterEach(func() { + // Reset the output buffer. + Expect(outputBuf.Clear()).ShouldNot(HaveOccurred()) + // Reset the arguments + args = nil + }) + + Describe("Without args and without flags", func() { + BeforeEach(func() { + // Set args to an empty slice. + args = []string{} + }) + + It("Should print the usage message", func() { + Expect(err).ShouldNot(HaveOccurred()) + Expect(string(outputBuf.Contents())).Should(Equal(usage)) + }) + }) + + Describe("help argument", func() { + BeforeEach(func() { + // Set the help argument. + args = []string{"help"} + }) + + It("Should print the usage message", func() { + Expect(err).ShouldNot(HaveOccurred()) + Expect(string(outputBuf.Contents())).Should(Equal(usage)) + }) + }) + + Describe("help flag", func() { + BeforeEach(func() { + // Set the help argument. + args = []string{"--help"} + }) + + It("Should print the usage message", func() { + Expect(err).ShouldNot(HaveOccurred()) + Expect(string(outputBuf.Contents())).Should(Equal(usage)) + }) + }) + + Describe("wrong flag", func() { + BeforeEach(func() { + // Set the help argument. + args = []string{"--wrong-flag"} + }) + + It("Should error and print the error", func() { + Expect(err).Should(HaveOccurred()) + Expect(outputBuf).Should(gbytes.Say("ERROR unknown flag: --wrong-flag")) + }) + }) +}) diff --git a/cmd/testdata/help.txt b/cmd/testdata/help.txt deleted file mode 100644 index 5fdd1c4f..00000000 --- a/cmd/testdata/help.txt +++ /dev/null @@ -1,29 +0,0 @@ - - __ _ _ _ - / _| __ _| | ___ ___ ___| |_| | - | |_ / _ | |/ __/ _ \ / __| __| | - | _| (_| | | (_| (_) | (__| |_| | - |_| \__,_|_|\___\___/ \___|\__|_| - - -The official CLI tool for working with Falco and its ecosystem components - -Usage: - falcoctl [command] - -Available Commands: - artifact Interact with Falco artifacts - completion Generate the autocompletion script for the specified shell - help Help about any command - index Interact with index - registry Interact with OCI registries - tls Generate and install TLS material for Falco - version Print the falcoctl version information - -Flags: - --config string config file to be used for falcoctl (default "/etc/falcoctl/falcoctl.yaml") - -h, --help help for falcoctl - --log-format string Set formatting for logs (color, text, json) (default "color") - --log-level string Set level for logs (info, warn, debug, trace) (default "info") - -Use "falcoctl [command] --help" for more information about a command. diff --git a/cmd/testdata/noargsnoflags.txt b/cmd/testdata/noargsnoflags.txt deleted file mode 100644 index 5fdd1c4f..00000000 --- a/cmd/testdata/noargsnoflags.txt +++ /dev/null @@ -1,29 +0,0 @@ - - __ _ _ _ - / _| __ _| | ___ ___ ___| |_| | - | |_ / _ | |/ __/ _ \ / __| __| | - | _| (_| | | (_| (_) | (__| |_| | - |_| \__,_|_|\___\___/ \___|\__|_| - - -The official CLI tool for working with Falco and its ecosystem components - -Usage: - falcoctl [command] - -Available Commands: - artifact Interact with Falco artifacts - completion Generate the autocompletion script for the specified shell - help Help about any command - index Interact with index - registry Interact with OCI registries - tls Generate and install TLS material for Falco - version Print the falcoctl version information - -Flags: - --config string config file to be used for falcoctl (default "/etc/falcoctl/falcoctl.yaml") - -h, --help help for falcoctl - --log-format string Set formatting for logs (color, text, json) (default "color") - --log-level string Set level for logs (info, warn, debug, trace) (default "info") - -Use "falcoctl [command] --help" for more information about a command. diff --git a/cmd/testdata/wrongflag.txt b/cmd/testdata/wrongflag.txt deleted file mode 100644 index 84363da1..00000000 --- a/cmd/testdata/wrongflag.txt +++ /dev/null @@ -1,20 +0,0 @@ -Usage: - falcoctl [command] - -Available Commands: - artifact Interact with Falco artifacts - completion Generate the autocompletion script for the specified shell - help Help about any command - index Interact with index - registry Interact with OCI registries - tls Generate and install TLS material for Falco - version Print the falcoctl version information - -Flags: - --config string config file to be used for falcoctl (default "/etc/falcoctl/falcoctl.yaml") - -h, --help help for falcoctl - --log-format string Set formatting for logs (color, text, json) (default "color") - --log-level string Set level for logs (info, warn, debug, trace) (default "info") - -Use "falcoctl [command] --help" for more information about a command. - diff --git a/cmd/tls/install/install.go b/cmd/tls/install/install.go index c07d7e93..c672b17f 100644 --- a/cmd/tls/install/install.go +++ b/cmd/tls/install/install.go @@ -43,8 +43,6 @@ func NewTLSInstallCmd(opt *commonoptions.Common) *cobra.Command { Long: `Falco gRPC server runs with mutually encrypted TLS by default. This command is a convenience to not only generate the TLS material, but also drop it off on the local filesystem.`, - SilenceErrors: true, - SilenceUsage: true, RunE: func(c *cobra.Command, args []string) error { return options.Run() }, diff --git a/cmd/version/version.go b/cmd/version/version.go index ef97ff2b..c4f5e5f0 100644 --- a/cmd/version/version.go +++ b/cmd/version/version.go @@ -85,12 +85,10 @@ func NewVersionCmd(opt *commonoptions.Common) *cobra.Command { v := newVersion() cmd := &cobra.Command{ - Use: "version", - Short: "Print the falcoctl version information", - Long: "Print the falcoctl version information", - Args: cobra.NoArgs, - SilenceErrors: true, - SilenceUsage: true, + Use: "version", + Short: "Print the falcoctl version information", + Long: "Print the falcoctl version information", + Args: cobra.NoArgs, PreRunE: func(cmd *cobra.Command, args []string) error { return o.validate() }, diff --git a/go.mod b/go.mod index 17e17d64..d0a60345 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.21 require ( cloud.google.com/go/storage v1.32.0 - github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d github.com/blang/semver v3.5.1+incompatible github.com/distribution/distribution/v3 v3.0.0-20230608105614-4501a6e06d3b github.com/docker/cli v24.0.5+incompatible @@ -29,7 +28,6 @@ require ( golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 google.golang.org/api v0.138.0 gopkg.in/yaml.v3 v3.0.1 - gotest.tools v2.2.0+incompatible oras.land/oras-go/v2 v2.2.1 ) diff --git a/go.sum b/go.sum index a9a20630..0b4d4800 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,6 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20230117174420-439a4b8ba167 h1:4sc2y3Lz github.com/Shopify/logrus-bugsnag v0.0.0-20230117174420-439a4b8ba167/go.mod h1:nBISMsZeFRL0qdZ1pKCSFv0j4veW0nOdVpOa49IMLeI= github.com/ThalesIgnite/crypto11 v1.2.5 h1:1IiIIEqYmBvUYFeMnHqRft4bwf/O36jryEUpY+9ef8E= github.com/ThalesIgnite/crypto11 v1.2.5/go.mod h1:ILDKtnCKiQ7zRoNxcp36Y1ZR8LBPmR2E23+wTQe/MlE= -github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= -github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -1561,8 +1559,6 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=