github.com/buildpacks/pack@v0.33.3-0.20240516162812-884dd1837311/internal/commands/manifest_inspect.go (about) 1 package commands 2 3 import ( 4 "errors" 5 6 "github.com/spf13/cobra" 7 8 "github.com/buildpacks/pack/pkg/logging" 9 ) 10 11 // ManifestInspect shows the manifest information stored locally 12 func ManifestInspect(logger logging.Logger, pack PackClient) *cobra.Command { 13 cmd := &cobra.Command{ 14 Use: "inspect <manifest-list>", 15 Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), 16 Short: "Display information about a manifest list.", 17 Example: `pack manifest inspect my-image-index`, 18 RunE: logError(logger, func(cmd *cobra.Command, args []string) error { 19 if args[0] == "" { 20 return errors.New("'<manifest-list>' is required") 21 } 22 return pack.InspectManifest(args[0]) 23 }), 24 } 25 26 AddHelpFlag(cmd, "inspect") 27 return cmd 28 }