mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
573 B
Go
29 lines
573 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/sirupsen/logrus"
|
|
"github.com/spf13/cobra"
|
|
"github.com/synctv-org/synctv/internal/bootstrap"
|
|
)
|
|
|
|
var ConfCmd = &cobra.Command{
|
|
Use: "conf",
|
|
Short: "init or check",
|
|
Long: `Init or check config file for correctness`,
|
|
PreRunE: func(cmd *cobra.Command, args []string) error {
|
|
return bootstrap.New(bootstrap.WithContext(cmd.Context())).Add(
|
|
bootstrap.InitConfig,
|
|
).Run()
|
|
},
|
|
RunE: Conf,
|
|
}
|
|
|
|
func Conf(cmd *cobra.Command, args []string) error {
|
|
logrus.Infof("success")
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
RootCmd.AddCommand(ConfCmd)
|
|
}
|