From e8faff4fe2bbdd36a383032dc4954fdc204768f7 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 22 Nov 2021 17:22:22 +0000 Subject: [PATCH] Use uint64 straight instead of converting --- cmd/headscale/cli/nodes.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/headscale/cli/nodes.go b/cmd/headscale/cli/nodes.go index 01d37a7d..f5117d95 100644 --- a/cmd/headscale/cli/nodes.go +++ b/cmd/headscale/cli/nodes.go @@ -33,14 +33,14 @@ func init() { } nodeCmd.AddCommand(registerNodeCmd) - expireNodeCmd.Flags().IntP("identifier", "i", 0, "Node identifier (ID)") + expireNodeCmd.Flags().Uint64P("identifier", "i", 0, "Node identifier (ID)") err = expireNodeCmd.MarkFlagRequired("identifier") if err != nil { log.Fatalf(err.Error()) } nodeCmd.AddCommand(expireNodeCmd) - deleteNodeCmd.Flags().IntP("identifier", "i", 0, "Node identifier (ID)") + deleteNodeCmd.Flags().Uint64P("identifier", "i", 0, "Node identifier (ID)") err = deleteNodeCmd.MarkFlagRequired("identifier") if err != nil { log.Fatalf(err.Error()) @@ -52,7 +52,7 @@ func init() { if err != nil { log.Fatalf(err.Error()) } - shareMachineCmd.Flags().IntP("identifier", "i", 0, "Node identifier (ID)") + shareMachineCmd.Flags().Uint64P("identifier", "i", 0, "Node identifier (ID)") err = shareMachineCmd.MarkFlagRequired("identifier") if err != nil { log.Fatalf(err.Error()) @@ -64,7 +64,7 @@ func init() { if err != nil { log.Fatalf(err.Error()) } - unshareMachineCmd.Flags().IntP("identifier", "i", 0, "Node identifier (ID)") + unshareMachineCmd.Flags().Uint64P("identifier", "i", 0, "Node identifier (ID)") err = unshareMachineCmd.MarkFlagRequired("identifier") if err != nil { log.Fatalf(err.Error()) @@ -269,7 +269,7 @@ var deleteNodeCmd = &cobra.Command{ } deleteRequest := &v1.DeleteMachineRequest{ - MachineId: uint64(identifier), + MachineId: identifier, } confirm := false