give shortcode to --config
This commit is contained in:
parent
fa1f4388c5
commit
11768a682c
2 changed files with 6 additions and 2 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -92,4 +92,8 @@ fabric.properties
|
|||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
/config.yaml
|
||||
!examples/config.yaml
|
||||
**/config.yaml
|
||||
|
||||
humble-bot
|
||||
bin/
|
|
@ -39,7 +39,7 @@ func Execute() {
|
|||
func init() {
|
||||
cobra.OnInitialize(initConfig, db.Initialize, log.InitializeLogger)
|
||||
|
||||
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $workingdir/config.yaml)")
|
||||
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $workingdir/config.yaml)")
|
||||
rootCmd.PersistentFlags().BoolVarP(&log.FlagDebug, "debug", "d", false, "enable debug logging")
|
||||
|
||||
// Cobra also supports local flags, which will only run
|
||||
|
|
Loading…
Reference in a new issue