forked from gotracker/gotracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplay_debug.go
More file actions
34 lines (28 loc) · 896 Bytes
/
Copy pathplay_debug.go
File metadata and controls
34 lines (28 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package command
import (
"github.com/gotracker/gotracker/internal/config"
"github.com/gotracker/gotracker/internal/play"
"github.com/spf13/cobra"
)
var playDebugSettings = config.NewConfig(play.DebugSettings{
PanicOnUnhandledEffect: false,
Tracing: false,
TracingFile: "",
})
func init() {
if err := playDebugSettings.Overlay(config.StandardOverlays...).Update(playDebugCmd); err != nil {
panic(err)
}
registerPlayFlags(playDebugCmd)
playCmd.AddCommand(playDebugCmd)
}
var playDebugCmd = &cobra.Command{
Use: "debug [flags] <file(s)>",
Short: "Play a tracked music file using Gotracker (with added debugging)",
Long: "Play one or more tracked music file(s) using Gotracker (with added debugging).",
Args: cobra.ArbitraryArgs,
RunE: func(cmd *cobra.Command, args []string) error {
parent := cmd.Parent()
return parent.RunE(cmd, args)
},
}