blasphem/cmd/blas/main.go

31 lines
481 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 {
panic(err)
}
}