Fix: fuck udp
This commit is contained in:
13
player.go
13
player.go
@@ -6,11 +6,22 @@ import (
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
var playerCmd = &cobra.Command{
|
||||
Use: "player",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
logger, _ := zap.Config{
|
||||
Level: zap.NewAtomicLevelAt(zap.InfoLevel),
|
||||
Encoding: "json",
|
||||
OutputPaths: []string{"logs/player-stdout.log"},
|
||||
ErrorOutputPaths: []string{"logs/player-stderr.log"},
|
||||
EncoderConfig: zap.NewProductionEncoderConfig(),
|
||||
}.Build()
|
||||
undo := zap.ReplaceGlobals(logger)
|
||||
defer undo()
|
||||
|
||||
base := stages.NewBaseModel(viper.GetString("auth-endpoint"))
|
||||
p := tea.NewProgram(stages.NewLandingModel(base))
|
||||
base.Push(types.Program{
|
||||
@@ -28,6 +39,8 @@ var playerCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
playerCmd.Flags().
|
||||
String("host", "127.0.0.1", "")
|
||||
playerCmd.Flags().
|
||||
Int("udp-listen-port", 18787, "")
|
||||
playerCmd.Flags().
|
||||
|
||||
Reference in New Issue
Block a user