MCPcopy Create free account
hub / github.com/cogentcore/core / cmdName

Function cmdName

cli/cli.go:87–90  ·  view source on GitHub ↗

cmdName returns the name of the command currently being run.

()

Source from the content-addressed store, hash-verified

85
86// cmdName returns the name of the command currently being run.
87func cmdName() string {
88 base := filepath.Base(os.Args[0])
89 return strings.TrimSuffix(base, filepath.Ext(base))
90}
91
92// cmdString is a simple helper function that returns a string
93// with [cmdName] and the given command name string combined

Callers 3

usageFunction · 0.85
RunFunction · 0.85
cmdStringFunction · 0.85

Calls 1

BaseMethod · 0.65

Tested by

no test coverage detected