cmd/headscale/cli: remove no-op Args functions from serveCmd and dumpConfigCmd

These functions unconditionally return nil, which is the default cobra
behavior when Args is not set.
This commit is contained in:
Kristoffer Dalby
2026-02-18 14:54:06 +00:00
parent 22fccae125
commit e816397d54
2 changed files with 0 additions and 6 deletions

View File

@@ -15,9 +15,6 @@ var dumpConfigCmd = &cobra.Command{
Use: "dumpConfig",
Short: "dump current config to /etc/headscale/config.dump.yaml, integration test only",
Hidden: true,
Args: func(cmd *cobra.Command, args []string) error {
return nil
},
RunE: func(cmd *cobra.Command, args []string) error {
err := viper.WriteConfigAs("/etc/headscale/config.dump.yaml")
if err != nil {

View File

@@ -16,9 +16,6 @@ func init() {
var serveCmd = &cobra.Command{
Use: "serve",
Short: "Launches the headscale server",
Args: func(cmd *cobra.Command, args []string) error {
return nil
},
RunE: func(cmd *cobra.Command, args []string) error {
app, err := newHeadscaleServerWithConfig()
if err != nil {