spiegel_podman/cmd/podman/pod.go
Valentin Rothberg 3839c00ae2 don't print help message for usage errors
Don't print potentially verbose help messages in case of usage errors,
but print only the usage error followed by a pointer to the command's
help.  This aligns with Docker.

```
$ podman run -h
flag needs an argument: -h
See 'podman run --help'.
```

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1379
Approved by: rhatdan
2018-08-31 10:19:11 +00:00

34 lines
723 B
Go

package main
import (
"github.com/urfave/cli"
)
var (
podDescription = `Manage container pods.
Pods are a group of one or more containers sharing the same network, pid and ipc namespaces.
`
podSubCommands = []cli.Command{
podCreateCommand,
podInspectCommand,
podKillCommand,
podPauseCommand,
podPsCommand,
podRestartCommand,
podRmCommand,
podStartCommand,
podStatsCommand,
podStopCommand,
podTopCommand,
podUnpauseCommand,
}
podCommand = cli.Command{
Name: "pod",
Usage: "Manage pods",
Description: podDescription,
UseShortOptionHandling: true,
Subcommands: podSubCommands,
OnUsageError: usageErrorHandler,
}
)