Files
podman/cmd/podman/inspect.go
Matt Heon 34166fc004 Bump Go version to v6
Tremendous amount of changes in here, but all should amount to
the same thing: changing Go import paths from v5 to v6.

Also bumped go.mod to github.com/containers/podman/v6 and updated
version to v6.0.0-dev.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-10-23 11:00:15 -04:00

49 lines
1.5 KiB
Go

package main
import (
"github.com/containers/podman/v6/cmd/podman/common"
"github.com/containers/podman/v6/cmd/podman/inspect"
"github.com/containers/podman/v6/cmd/podman/registry"
"github.com/containers/podman/v6/pkg/domain/entities"
"github.com/spf13/cobra"
)
var (
inspectDescription = `Displays the low-level information on an object identified by name or ID.
For more inspection options, see:
podman artifact inspect
podman container inspect
podman image inspect
podman network inspect
podman pod inspect
podman volume inspect`
// Command: podman _inspect_ Object_ID
inspectCmd = &cobra.Command{
Use: "inspect [options] {ARTIFACT|CONTAINER|IMAGE|POD|NETWORK|VOLUME} [...]",
Short: "Display the configuration of object denoted by ID",
RunE: inspectExec,
Long: inspectDescription,
TraverseChildren: true,
ValidArgsFunction: common.AutocompleteInspect,
Example: `podman inspect fedora
podman inspect --type image fedora
podman inspect --type artifact quay.io/myimage/myartifact:latest
podman inspect CtrID ImgID
podman inspect --format "imageId: {{.Id}} size: {{.Size}}" fedora`,
}
inspectOpts *entities.InspectOptions
)
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
Command: inspectCmd,
})
inspectOpts = inspect.AddInspectFlagSet(inspectCmd)
}
func inspectExec(_ *cobra.Command, args []string) error {
return inspect.Inspect(args, *inspectOpts)
}