From 11768a682c47da94e190942172e53ce3d6b113ae Mon Sep 17 00:00:00 2001 From: lauralani Date: Thu, 6 Jul 2023 07:02:46 +0200 Subject: [PATCH] give shortcode to --config --- .gitignore | 6 +++++- cmd/root.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 63121f8..04889c1 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ \ No newline at end of file diff --git a/cmd/root.go b/cmd/root.go index bb77f06..a04dc70 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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