2023-07-03 15:30:14 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023 Laura Kalb <dev@lauka.net>
|
|
|
|
* The code of this project is available under the MIT license. See the LICENSE file for more info.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"codeberg.org/lauralani/humble-bot/app"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// daemonCmd represents the daemon command
|
|
|
|
var daemonCmd = &cobra.Command{
|
|
|
|
Use: "daemon",
|
2023-07-04 16:56:09 +02:00
|
|
|
Short: "Run humble-bot as daemon",
|
2023-07-03 15:30:14 +02:00
|
|
|
Long: `A longer description that spans multiple lines and likely contains examples
|
|
|
|
and usage of using your command. For example:
|
|
|
|
|
|
|
|
Cobra is a CLI library for Go that empowers applications.
|
|
|
|
This application is a tool to generate the needed files
|
|
|
|
to quickly create a Cobra application.`,
|
2023-07-04 16:56:09 +02:00
|
|
|
Args: cobra.ExactArgs(0),
|
|
|
|
Run: app.RunDaemon,
|
2023-07-03 15:30:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(daemonCmd)
|
|
|
|
|
|
|
|
// Here you will define your flags and configuration settings.
|
|
|
|
|
|
|
|
// Cobra supports Persistent Flags which will work for this command
|
|
|
|
// and all subcommands, e.g.:
|
|
|
|
// daemonCmd.PersistentFlags().String("foo", "", "A help for foo")
|
|
|
|
|
|
|
|
// Cobra supports local flags which will only run when this command
|
|
|
|
// is called directly, e.g.:
|
|
|
|
// daemonCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
|
|
|
|
}
|