Add logging

This commit is contained in:
2022-09-10 00:09:09 +02:00
parent 8ceb4452f9
commit af142c4b09
9 changed files with 170 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package commands
import (
"github.com/spf13/cobra"
"go.uber.org/zap"
)
func CreateServerCmd(logger *zap.Logger) *cobra.Command {
cmd := &cobra.Command{
Use: "krakenserver",
}
cmd.AddCommand(NewStartServerCommand(logger))
return cmd
}

View File

@@ -0,0 +1,21 @@
package commands
import (
"errors"
"github.com/spf13/cobra"
"go.uber.org/zap"
)
func NewStartServerCommand(logger *zap.Logger) *cobra.Command {
cmd := &cobra.Command{
Use: "start",
Short: "Start the kraken server",
RunE: func(cmd *cobra.Command, args []string) error {
return errors.New("some error")
},
}
return cmd
}