I believe it's all working

This commit is contained in:
2023-12-01 09:26:25 -06:00
parent de126011c4
commit ff58d1ddf4
18 changed files with 137 additions and 306 deletions

View File

@@ -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")
}