Files
sablier/cmd/start.go
Alexis Couvreur 7703a3041c Revert "fix: bump import to v2"
This reverts commit 9cb9b2aa7a57047a7e61b2c54732b3e25300bf20.
2022-10-03 20:27:14 +00:00

23 lines
406 B
Go

package cmd
import (
"github.com/acouvreur/sablier/app"
"github.com/acouvreur/sablier/config"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var startCmd = &cobra.Command{
Use: "start",
Short: "Start the Sablier server",
Run: func(cmd *cobra.Command, args []string) {
conf := config.NewConfig()
viper.Unmarshal(&conf)
err := app.Start(conf)
if err != nil {
panic(err)
}
},
}