From 6ab6e2c3073d47755d441ee8c1bce90e34082e99 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 21 Feb 2019 17:09:59 -0600 Subject: hide --latest on the remote-client in the case of the remote-client, it was decided to hide the latest flag to avoid confusion for end-users on what the "last" container, volume, or pod are. Signed-off-by: baude --- cmd/podman/utils.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cmd/podman/utils.go') diff --git a/cmd/podman/utils.go b/cmd/podman/utils.go index 88ac62304..0fbea417b 100644 --- a/cmd/podman/utils.go +++ b/cmd/podman/utils.go @@ -3,6 +3,7 @@ package main import ( "context" "fmt" + "github.com/spf13/pflag" "os" gosignal "os/signal" @@ -244,3 +245,11 @@ func printParallelOutput(m map[string]error, errCount int) error { } return lastError } + +// markFlagHiddenForRemoteClient makes the flag not appear as part of the CLI +// on the remote-client +func markFlagHiddenForRemoteClient(flagName string, flags *pflag.FlagSet) { + if remoteclient { + flags.MarkHidden(flagName) + } +} -- cgit v1.2.3-54-g00ecf