From 7565cc4437bb0828156ceff8e130ea65ded2be47 Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Tue, 12 Mar 2024 18:20:00 -0600 Subject: [PATCH] update comments Signed-off-by: Meredith Lancaster --- pkg/cmd/attestation/artifact/oci/client.go | 2 +- pkg/cmd/attestation/download/download.go | 3 --- pkg/cmd/attestation/inspect/inspect.go | 3 --- pkg/cmd/attestation/verify/verify.go | 3 --- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/pkg/cmd/attestation/artifact/oci/client.go b/pkg/cmd/attestation/artifact/oci/client.go index 2c79faa39..77e78d485 100644 --- a/pkg/cmd/attestation/artifact/oci/client.go +++ b/pkg/cmd/attestation/artifact/oci/client.go @@ -43,7 +43,7 @@ func (c LiveClient) GetImageDigest(imgName string) (*v1.Hash, error) { } // The user must already be authenticated with the container registry - // The authn.DefaultKeychain argument indicates that Get should checks the + // The authn.DefaultKeychain argument indicates that Get should checks the // user's configuration for the registry credentials desc, err := c.Get(name, remote.WithAuthFromKeychain(authn.DefaultKeychain)) if err != nil { diff --git a/pkg/cmd/attestation/download/download.go b/pkg/cmd/attestation/download/download.go index a2cb38cc2..4a8b289bb 100644 --- a/pkg/cmd/attestation/download/download.go +++ b/pkg/cmd/attestation/download/download.go @@ -73,9 +73,6 @@ func NewDownloadCmd(f *cmdutil.Factory) *cobra.Command { } return nil }, - // Use Run instead of RunE because if an error is returned by RunVerify - // when RunE is used, the command usage will be printed - // We only want to print the error, not usage RunE: func(cmd *cobra.Command, args []string) error { hc, err := f.HttpClient() if err != nil { diff --git a/pkg/cmd/attestation/inspect/inspect.go b/pkg/cmd/attestation/inspect/inspect.go index 24ce22fc9..63631d7ba 100644 --- a/pkg/cmd/attestation/inspect/inspect.go +++ b/pkg/cmd/attestation/inspect/inspect.go @@ -66,9 +66,6 @@ func NewInspectCmd(f *cmdutil.Factory) *cobra.Command { return nil }, - // Use Run instead of RunE because if an error is returned by runInspect - // when RunE is used, the command usage will be printed - // We only want to print the error, not usage RunE: func(cmd *cobra.Command, args []string) error { opts.OCIClient = oci.NewLiveClient() diff --git a/pkg/cmd/attestation/verify/verify.go b/pkg/cmd/attestation/verify/verify.go index 074b25fb1..a379e2a2a 100644 --- a/pkg/cmd/attestation/verify/verify.go +++ b/pkg/cmd/attestation/verify/verify.go @@ -88,9 +88,6 @@ func NewVerifyCmd(f *cmdutil.Factory) *cobra.Command { return nil }, - // Use Run instead of RunE because if an error is returned by runVerify - // when RunE is used, the command usage will be printed - // We only want to print the error, not usage RunE: func(cmd *cobra.Command, args []string) error { hc, err := f.HttpClient() if err != nil {