From 6f3420b0ecebcbd3f09b80e207828f94570728d7 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Mon, 31 Oct 2022 14:42:48 +0800 Subject: [PATCH] update Signed-off-by: Patrick Zheng --- cmd/notation/key.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/notation/key.go b/cmd/notation/key.go index 41dea1182..bcf5c4bd6 100644 --- a/cmd/notation/key.go +++ b/cmd/notation/key.go @@ -50,6 +50,7 @@ func keyCommand() *cobra.Command { Short: "Manage keys used for signing", } command.AddCommand(keyAddCommand(nil), keyUpdateCommand(nil), keyListCommand(), keyDeleteCommand(nil)) + return command } @@ -78,6 +79,7 @@ func keyAddCommand(opts *keyAddOpts) *cobra.Command { cmd.SetPflagPluginConfig(command.Flags(), &opts.pluginConfig) setKeyDefaultFlag(command.Flags(), &opts.isDefault) + return command } @@ -102,6 +104,7 @@ func keyUpdateCommand(opts *keyUpdateOpts) *cobra.Command { } setKeyDefaultFlag(command.Flags(), &opts.isDefault) + return command } @@ -120,6 +123,7 @@ func keyDeleteCommand(opts *keyDeleteOpts) *cobra.Command { if opts == nil { opts = &keyDeleteOpts{} } + return &cobra.Command{ Use: "delete [flags] ...", Aliases: []string{"rm"}, @@ -173,6 +177,7 @@ func addKey(command *cobra.Command, opts *keyAddOpts) error { } else { fmt.Println(key.Name) } + return nil } @@ -193,6 +198,7 @@ func addExternalKey(ctx context.Context, opts *keyAddOpts, pluginName, keyName s if err != nil { return config.KeySuite{}, err } + return config.KeySuite{ Name: keyName, ExternalKey: &config.ExternalKey{