blasphem/cmd/blas/main.go

31 lines
485 B
Go
Raw Normal View History

2022-09-25 22:16:21 -04:00
package main
import (
"log"
"dynatron.me/x/blasphem/internal/common"
"dynatron.me/x/blasphem/pkg/cmd/serve"
"dynatron.me/x/blasphem/pkg/config"
"github.com/spf13/cobra"
)
func main() {
rootCmd := cobra.Command{
Use: common.AppName,
}
config, err := config.ReadConfig()
if err != nil {
log.Fatal(err)
}
rootCmd.AddCommand(serve.Command(config))
// rootCmd.AddCommand(package.MyCommand([conf]), ...)
err = rootCmd.Execute()
if err != nil {
2022-10-25 00:16:29 -04:00
log.Fatal(err)
2022-09-25 22:16:21 -04:00
}
}