pass factory object to inspect cmd, add inspect sub cmd to attestation cmd

Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
Meredith Lancaster 2024-03-04 13:58:02 -07:00
parent 884fe225d1
commit f832d57eb3
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,7 @@ package attestation
import (
"github.com/cli/cli/v2/pkg/cmd/attestation/download"
"github.com/cli/cli/v2/pkg/cmd/attestation/inspect"
"github.com/cli/cli/v2/pkg/cmd/attestation/verify"
"github.com/cli/cli/v2/pkg/cmdutil"
@ -27,6 +28,7 @@ func NewCmdAttestation(f *cmdutil.Factory) *cobra.Command {
}
root.AddCommand(download.NewDownloadCmd(f))
root.AddCommand(inspect.NewInspectCmd(f))
root.AddCommand(verify.NewVerifyCmd(f))
return root

View file

@ -5,6 +5,7 @@ import (
"fmt"
"os"
"github.com/cli/cli/v2/pkg/cmdutil"
"github.com/cli/cli/v2/pkg/cmd/attestation/artifact"
"github.com/cli/cli/v2/pkg/cmd/attestation/verification"
@ -12,7 +13,7 @@ import (
"github.com/spf13/cobra"
)
func NewInspectCmd() *cobra.Command {
func NewInspectCmd(f *cmdutil.Factory) *cobra.Command {
opts := &Options{}
inspectCmd := &cobra.Command{
Use: "inspect [<file path> | oci://<OCI image URI>]",