Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "mixer", Long: `Mixer is a tool used to compose OS update content and images.`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { if rootCmdFlags.cpuProfile != "" { f, err := os.Create(rootCmdFlags.cpuProfile) if err != nil { failf("couldn't create file for CPU profile: %s", err) } err = pprof.StartCPUProfile(f) if err != nil { failf("couldn't start profiling: %s", err) } } if cmd.Parent() == nil { if rootCmdFlags.version { fmt.Printf("Mixer %s\n", builder.Version) os.Exit(0) } if rootCmdFlags.check { ok := checkAllDeps() if !ok { os.Exit(1) } os.Exit(0) } } return checkCmdDeps(cmd) }, PersistentPostRun: func(cmd *cobra.Command, args []string) { if rootCmdFlags.cpuProfile != "" { pprof.StopCPUProfile() } }, Run: func(cmd *cobra.Command, args []string) { cmd.Print(cmd.UsageString()) }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.