I believe it's all working
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright © 2023 Brian Buller <brian@bullercodeworks.com>
|
||||
|
||||
*/
|
||||
package cmd
|
||||
|
||||
@@ -13,7 +12,6 @@ import (
|
||||
|
||||
"git.bullercodeworks.com/brian/helperbot/app"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var debug = false
|
||||
@@ -38,6 +36,7 @@ var rootCmd = &cobra.Command{
|
||||
// Save the changes when the app quits
|
||||
fmt.Println("\nFinishing up...")
|
||||
a.SendQuitMessage()
|
||||
a.Running = false
|
||||
}()
|
||||
for a.Running {
|
||||
time.Sleep(time.Second * 1)
|
||||
@@ -58,5 +57,4 @@ func Execute() {
|
||||
|
||||
func init() {
|
||||
rootCmd.Flags().BoolVarP(&debug, "debug", "d", false, "Debug mode")
|
||||
viper.SetDefault("plugin_dir", "plugins")
|
||||
}
|
||||
|
Reference in New Issue
Block a user