mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-23 00:58:43 +02:00
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:
@@ -15,9 +15,6 @@ var dumpConfigCmd = &cobra.Command{
|
|||||||
Use: "dumpConfig",
|
Use: "dumpConfig",
|
||||||
Short: "dump current config to /etc/headscale/config.dump.yaml, integration test only",
|
Short: "dump current config to /etc/headscale/config.dump.yaml, integration test only",
|
||||||
Hidden: true,
|
Hidden: true,
|
||||||
Args: func(cmd *cobra.Command, args []string) error {
|
|
||||||
return nil
|
|
||||||
},
|
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
err := viper.WriteConfigAs("/etc/headscale/config.dump.yaml")
|
err := viper.WriteConfigAs("/etc/headscale/config.dump.yaml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -16,9 +16,6 @@ func init() {
|
|||||||
var serveCmd = &cobra.Command{
|
var serveCmd = &cobra.Command{
|
||||||
Use: "serve",
|
Use: "serve",
|
||||||
Short: "Launches the headscale server",
|
Short: "Launches the headscale server",
|
||||||
Args: func(cmd *cobra.Command, args []string) error {
|
|
||||||
return nil
|
|
||||||
},
|
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
app, err := newHeadscaleServerWithConfig()
|
app, err := newHeadscaleServerWithConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user