package main import ( "log/slog" "os" "github.com/spf13/cobra" ) func main() { if err := newRootCommand().Execute(); err != nil { slog.Error("command failed", "error", err) os.Exit(1) } } func newRootCommand() *cobra.Command { root := &cobra.Command{ Use: "sip-go-agent", Short: "SIP Go Agent and Dispatcher", SilenceUsage: true, SilenceErrors: true, } root.AddCommand(newAgentCommand(), newDispatcherCommand()) return root }