MCPcopy Index your code
hub / github.com/docker/cli / command

Method command

cli-plugins/hooks/template.go:65–70  ·  view source on GitHub ↗

command returns the name of the (sub)command for which the hook was invoked.

()

Source from the content-addressed store, hash-verified

63
64// command returns the name of the (sub)command for which the hook was invoked.
65func (c commandInfo) command() string {
66 if c.cmd == nil {
67 return ""
68 }
69 return c.cmd.Name()
70}
71
72// flagValue returns the value that was set for the given flag when the hook was invoked.
73func (c commandInfo) flagValue(flagName string) (string, error) {

Callers 1

NameMethod · 0.95

Calls 1

NameMethod · 0.45

Tested by

no test coverage detected