INNER CODE UNIT · Go

init

inspektor-gadget/inspektor-gadget · cmd/kubectl-gadget/main.go:52

func init() {
	utils.FlagInit(rootCmd)
}

func main() {
	if experimental.Enabled() {
		log.Info("Experimental features enabled")
	}

	common.AddConfigFlag(rootCmd)
	common.AddVerboseFlag(rootCmd)

	// Some commands don't need the gadget namespace. Run then before to avoid
	// printing warnings about gadget namespace not found.
	needGadgetNamespace := true
	isHelp := len(os.Args) == 1

	// Need to loop through all arguments to skip flags...

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…