31 lines
481 B
Go
31 lines
481 B
Go
|
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)
|
||
|
}
|
||
|
}
|