INNER CODE UNIT · Go
init
chriswalz/bit · cmd/bit_cmd.go:61
func init() {
BitCmd.PersistentFlags().Bool("debug", false, "Print debugging information")
}
// Execute adds all child commands to the shell command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the BitCmd.
func Execute() {
if err := BitCmd.Execute(); err != nil {
log.Info().Err(err)
os.Exit(1)
}
}
func shellCommandCompleter(suggestionTree *complete.CompTree) func(d prompt.Document) []prompt.Suggest {
return func(d prompt.Document) []prompt.Suggest {
return promptCompleter(suggestionTree, d.Text)
}
}