Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zheng <[email protected]>
  • Loading branch information
Two-Hearts committed Oct 31, 2022
1 parent 0766666 commit 6f3420b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/notation/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -78,6 +79,7 @@ func keyAddCommand(opts *keyAddOpts) *cobra.Command {

cmd.SetPflagPluginConfig(command.Flags(), &opts.pluginConfig)
setKeyDefaultFlag(command.Flags(), &opts.isDefault)

return command
}

Expand All @@ -102,6 +104,7 @@ func keyUpdateCommand(opts *keyUpdateOpts) *cobra.Command {
}

setKeyDefaultFlag(command.Flags(), &opts.isDefault)

return command
}

Expand All @@ -120,6 +123,7 @@ func keyDeleteCommand(opts *keyDeleteOpts) *cobra.Command {
if opts == nil {
opts = &keyDeleteOpts{}
}

return &cobra.Command{
Use: "delete [flags] <key_name>...",
Aliases: []string{"rm"},
Expand Down Expand Up @@ -173,6 +177,7 @@ func addKey(command *cobra.Command, opts *keyAddOpts) error {
} else {
fmt.Println(key.Name)
}

return nil
}

Expand All @@ -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{
Expand Down

0 comments on commit 6f3420b

Please sign in to comment.