MCPcopy
hub / github.com/cilium/cilium / Initialize

Function Initialize

hubble/cmd/common/template/usage.go:30–34  ·  view source on GitHub ↗

Initialize goes through the registered commands, and their flagsets and initializes the help template command registry. This must be called after all commands are added as sub-commands, because cmd.CommandPath relies on the commands having parents.

()

Source from the content-addressed store, hash-verified

28// This must be called after all commands are added as sub-commands, because
29// cmd.CommandPath relies on the commands having parents.
30func Initialize() {
31 for cmd, fs := range commandFlagSets {
32 commandPathFlagSets[cmd.CommandPath()] = fs
33 }
34}
35
36// RegisterFlagSets registers flags to be included in a commands usage text (--help).
37func RegisterFlagSets(cmd *cobra.Command, flagsets ...*pflag.FlagSet) {

Callers 2

NewWithViperFunction · 0.92
TestUsageFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestUsageFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…