From c8244f7dbdb4f76034a510a6624e901a6902f67a Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 25 Jul 2022 22:26:10 +0000 Subject: [PATCH] robot: Make linter happy --- cmd/agent/main.go | 4 +--- cmd/cli/bridge.go | 2 +- cmd/cli/main.go | 2 -- cmd/provider/main.go | 7 ++++++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/agent/main.go b/cmd/agent/main.go index fe94a7f..58640dc 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -1,8 +1,6 @@ package main import ( - //"fmt" - "context" "encoding/json" "fmt" @@ -268,7 +266,7 @@ This command is meant to be used from the boot GRUB menu, but can be started man Description: ` Starts c3os recovery mode. -In recovery mode a QR code will be printed out on the screen which should be used in conjuction with "c3os bridge". Pass by the QR code as snapshot +In recovery mode a QR code will be printed out on the screen which should be used in conjunction with "c3os bridge". Pass by the QR code as snapshot to the bridge to connect over the machine which runs the "c3os recovery" command. See also https://docs.c3os.io/after_install/recovery_mode/ for documentation. diff --git a/cmd/cli/bridge.go b/cmd/cli/bridge.go index 35502e3..14d3723 100644 --- a/cmd/cli/bridge.go +++ b/cmd/cli/bridge.go @@ -112,7 +112,7 @@ func bridge(c *cli.Context) error { return err } - go api.API(ctx, c.String("api"), 5*time.Second, 20*time.Second, e, nil, false) + go api.API(ctx, c.String("api"), 5*time.Second, 20*time.Second, e, nil, false) //nolint:errcheck return e.Start(ctx) } diff --git a/cmd/cli/main.go b/cmd/cli/main.go index b1b79ce..4b5bb85 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -1,8 +1,6 @@ package main import ( - //"fmt" - "fmt" "os" diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 454736d..62ee6ec 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "os" "github.com/c3os-io/c3os/internal/provider" @@ -21,5 +22,9 @@ func main() { // Expected output: string factory.Add(bus.EventChallenge, provider.Challenge) - factory.Run(pluggable.EventType(os.Args[1]), os.Stdin, os.Stdout) + err := factory.Run(pluggable.EventType(os.Args[1]), os.Stdin, os.Stdout) + if err != nil { + fmt.Println(err) + os.Exit(1) + } }