Documentation
¶
Index ¶
- func AliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName
- func ExitCodeFromBuildError(errorMsg string) (int, error)
- func FileExists(path string) bool
- func HandleOSExecError(err error) error
- func IsCheckpointImage(ctx context.Context, namesOrIDs []string) (bool, error)
- func IsDir(path string) bool
- func PrintContainerPruneResults(containerPruneReports []*reports.PruneReport, heading bool) error
- func PrintGenericJSON(data interface{}) error
- func PrintImagePruneResults(imagePruneReports []*reports.PruneReport, heading bool) error
- func PrintNetworkPruneResults(networkPruneReport []*entities.NetworkPruneReport, heading bool) error
- func PrintPodPruneResults(podPruneReports []*entities.PodPruneReport, heading bool) error
- func PrintVolumePruneResults(volumePruneReport []*reports.PruneReport, heading bool) error
- func RemoveSlash(input []string) []string
- func TimeoutAliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName
- type OutputErrors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AliasFlags ¶
func AliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName
AliasFlags is a function to handle backwards compatibility with old flags
func ExitCodeFromBuildError ¶
For remote client, server does not return error with exit code
instead returns a message and we cast it to a new error. Following function performs parsing on build error and returns exit status which was expected for this current build
func FileExists ¶
FileExists returns true if path refers to an existing file.
func HandleOSExecError ¶
HandleOSExecError checks the given error for an exec.ExitError error and sets the same podman exit code as the error. No error will be returned in this case to make sure things like podman unshare false work correctly without extra output. When the exec file does not exist we set the exit code to 127, for permission errors 126 is used as exit code. In this case we still return the error so the user gets an error message. If the error is nil it returns nil.
func IsCheckpointImage ¶
IsCheckpointImage returns true with no error only if all values in namesOrIDs correspond to checkpoint images AND these images are compatible with the container runtime that is currently in use, e.g., crun or runc.
IsCheckpointImage returns false with no error when none of the values in namesOrIDs corresponds to an ID or name of an image.
Otherwise, IsCheckpointImage returns false with appropriate error.
func PrintContainerPruneResults ¶
func PrintContainerPruneResults(containerPruneReports []*reports.PruneReport, heading bool) error
func PrintGenericJSON ¶ added in v5.4.0
func PrintGenericJSON(data interface{}) error
func PrintImagePruneResults ¶
func PrintImagePruneResults(imagePruneReports []*reports.PruneReport, heading bool) error
func PrintNetworkPruneResults ¶
func PrintNetworkPruneResults(networkPruneReport []*entities.NetworkPruneReport, heading bool) error
func PrintPodPruneResults ¶
func PrintPodPruneResults(podPruneReports []*entities.PodPruneReport, heading bool) error
func PrintVolumePruneResults ¶
func PrintVolumePruneResults(volumePruneReport []*reports.PruneReport, heading bool) error
func RemoveSlash ¶
func TimeoutAliasFlags ¶
func TimeoutAliasFlags(f *pflag.FlagSet, name string) pflag.NormalizedName
TimeoutAliasFlags is a function to handle backwards compatibility with old timeout flags
Types ¶
type OutputErrors ¶
type OutputErrors []error
func (OutputErrors) PrintErrors ¶
func (o OutputErrors) PrintErrors() (lastError error)