From b152e53b13f9c93900a1290af473a7eb1fcdc07e Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Sun, 21 Nov 2021 21:34:03 +0000 Subject: [PATCH] Use correct type for nodes command --- cmd/headscale/cli/nodes.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/headscale/cli/nodes.go b/cmd/headscale/cli/nodes.go index 29679f0d..4bc0e316 100644 --- a/cmd/headscale/cli/nodes.go +++ b/cmd/headscale/cli/nodes.go @@ -191,7 +191,7 @@ var expireNodeCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { output, _ := cmd.Flags().GetString("output") - identifier, err := cmd.Flags().GetInt("identifier") + identifier, err := cmd.Flags().GetUint64("identifier") if err != nil { ErrorOutput( err, @@ -207,7 +207,7 @@ var expireNodeCmd = &cobra.Command{ defer conn.Close() request := &v1.ExpireMachineRequest{ - MachineId: uint64(identifier), + MachineId: identifier, } response, err := client.ExpireMachine(ctx, request) @@ -234,7 +234,7 @@ var deleteNodeCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { output, _ := cmd.Flags().GetString("output") - identifier, err := cmd.Flags().GetInt("identifier") + identifier, err := cmd.Flags().GetUint64("identifier") if err != nil { ErrorOutput( err, @@ -250,7 +250,7 @@ var deleteNodeCmd = &cobra.Command{ defer conn.Close() getRequest := &v1.GetMachineRequest{ - MachineId: uint64(identifier), + MachineId: identifier, } getResponse, err := client.GetMachine(ctx, getRequest) @@ -331,7 +331,7 @@ func sharingWorker( defer cancel() defer conn.Close() - identifier, err := cmd.Flags().GetInt("identifier") + identifier, err := cmd.Flags().GetUint64("identifier") if err != nil { ErrorOutput(err, fmt.Sprintf("Error converting ID to integer: %s", err), output) @@ -339,7 +339,7 @@ func sharingWorker( } machineRequest := &v1.GetMachineRequest{ - MachineId: uint64(identifier), + MachineId: identifier, } machineResponse, err := client.GetMachine(ctx, machineRequest)