From bc2574680db6d401302cb8c507fb69c287e29668 Mon Sep 17 00:00:00 2001 From: Juan Font Date: Sun, 15 Aug 2021 23:35:03 +0200 Subject: [PATCH] Linting --- cmd/headscale/cli/namespaces.go | 5 ++++- cmd/headscale/cli/nodes.go | 6 ++++-- cmd/headscale/cli/preauthkeys.go | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cmd/headscale/cli/namespaces.go b/cmd/headscale/cli/namespaces.go index e0bc0f20..c35c02cc 100644 --- a/cmd/headscale/cli/namespaces.go +++ b/cmd/headscale/cli/namespaces.go @@ -101,6 +101,9 @@ var listNamespacesCmd = &cobra.Command{ for _, n := range *namespaces { d = append(d, []string{strconv.FormatUint(uint64(n.ID), 10), n.Name, n.CreatedAt.Format("2006-01-02 15:04:05")}) } - pterm.DefaultTable.WithHasHeader().WithData(d).Render() + err = pterm.DefaultTable.WithHasHeader().WithData(d).Render() + if err != nil { + log.Fatal(err) + } }, } diff --git a/cmd/headscale/cli/nodes.go b/cmd/headscale/cli/nodes.go index fdcaf760..d72201c9 100644 --- a/cmd/headscale/cli/nodes.go +++ b/cmd/headscale/cli/nodes.go @@ -94,8 +94,10 @@ var listNodesCmd = &cobra.Command{ log.Fatalf("Error converting to table: %s", err) } - pterm.DefaultTable.WithHasHeader().WithData(d).Render() - + err = pterm.DefaultTable.WithHasHeader().WithData(d).Render() + if err != nil { + log.Fatal(err) + } }, } diff --git a/cmd/headscale/cli/preauthkeys.go b/cmd/headscale/cli/preauthkeys.go index 4d07928d..1340267e 100644 --- a/cmd/headscale/cli/preauthkeys.go +++ b/cmd/headscale/cli/preauthkeys.go @@ -81,7 +81,10 @@ var listPreAuthKeys = &cobra.Command{ }) } - pterm.DefaultTable.WithHasHeader().WithData(d).Render() + err = pterm.DefaultTable.WithHasHeader().WithData(d).Render() + if err != nil { + log.Fatal(err) + } }, }