github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/cmd/podmanV2/common/inspect.go (about) 1 package common 2 3 import ( 4 "github.com/containers/libpod/pkg/domain/entities" 5 "github.com/spf13/cobra" 6 ) 7 8 // AddInspectFlagSet takes a command and adds the inspect flags and returns an InspectOptions object 9 // Since this cannot live in `package main` it lives here until a better home is found 10 func AddInspectFlagSet(cmd *cobra.Command) *entities.InspectOptions { 11 opts := entities.InspectOptions{} 12 13 flags := cmd.Flags() 14 flags.BoolVarP(&opts.Size, "size", "s", false, "Display total file size") 15 flags.StringVarP(&opts.Format, "format", "f", "", "Change the output format to a Go template") 16 17 return &opts 18 }