Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "vellum", Short: "A utility to work with vellum FST files", Long: `A utility to work with vellum FST files.`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { if expvarBind != "" { go http.ListenAndServe(expvarBind, nil) } if cpuprofile != "" { f, err := os.Create(cpuprofile) if err != nil { return err } pprof.StartCPUProfile(f) } if traceprofile != "" { f, err := os.Create(traceprofile) if err != nil { return err } if err := trace.Start(f); err != nil { return err } } return nil }, PersistentPostRunE: func(cmd *cobra.Command, args []string) error { if cpuprofile != "" { pprof.StopCPUProfile() } if memprofile != "" { f, err := os.Create(memprofile) if err != nil { return err } if err := pprof.WriteHeapProfile(f); err != nil { return err } if err := f.Close(); err != nil { return err } } if traceprofile != "" { trace.Stop() } return nil }, }
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.