Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "reboot", Short: "A brief description of your application", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your application. 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.`, Run: func(cmd *cobra.Command, args []string) { defer glog.Flush() ticker := time.NewTimer(time.Second) defer ticker.Stop() go func() { for _ = range ticker.C { glog.Flush() } }() glog.Info(viper.GetString("server.listen")) s := server.New(server.Options{ ListenAddr: viper.GetString("server.listen"), CtrlOpts: &controller.Options{ DB: pkgs.GetDao(), }, }) schedManager := pkgs.GetScheduler(pkgs.GetDao()) go schedManager.Schedule() if err := s.ListenAndServer(); err != nil { println(err) } schedManager.Stop() }, }
This represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.