Update cmd/headscale/cli/nodes.go

Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
This commit is contained in:
Ward Vandewege 2021-10-28 08:39:27 -04:00 committed by GitHub
parent d086cf4691
commit 6c01b86e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -213,7 +213,7 @@ var deleteNodeCmd = &cobra.Command{
}
func sharingWorker(cmd *cobra.Command, args []string) (*headscale.Headscale, string, *headscale.Machine, *headscale.Namespace) {
n, err := cmd.Flags().GetString("namespace")
namespaceStr, err := cmd.Flags().GetString("namespace")
if err != nil {
log.Fatalf("Error getting namespace: %s", err)
}
@ -225,7 +225,7 @@ func sharingWorker(cmd *cobra.Command, args []string) (*headscale.Headscale, str
log.Fatalf("Error initializing: %s", err)
}
namespace, err := h.GetNamespace(n)
namespace, err := h.GetNamespace(namespaceStr)
if err != nil {
log.Fatalf("Error fetching namespace %s: %s", n, err)
}