From 890f7094f5e45247ff47cf1a5bfbcf240c14bbf2 Mon Sep 17 00:00:00 2001 From: Malte Bauch <malte.bauch@stud.h-da.de> Date: Fri, 26 Mar 2021 17:02:18 +0100 Subject: [PATCH] gofmt --- cli/get.go | 4 ++-- cli/integration_test.go | 2 +- cmd/get.go | 2 +- nucleus/controller.go | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cli/get.go b/cli/get.go index f2b2e6e80..ccd8b25a4 100644 --- a/cli/get.go +++ b/cli/get.go @@ -9,7 +9,7 @@ import ( ) // Get sends a gNMI Get request to the specified target and prints the response to stdout -func Get(a, u, p string, args ...string) (*gpb.GetResponse,error) { +func Get(a, u, p string, args ...string) (*gpb.GetResponse, error) { sbi := &nucleus.OpenConfig{} opts := &nucleus.GnmiTransportOptions{ Config: gnmi.Config{ @@ -22,7 +22,7 @@ func Get(a, u, p string, args ...string) (*gpb.GetResponse,error) { } t, err := nucleus.NewGnmiTransport(opts) if err != nil { - return nil,err + return nil, err } resp, err := t.Get(context.Background(), args...) if err != nil { diff --git a/cli/integration_test.go b/cli/integration_test.go index 98de27882..85a8208c3 100644 --- a/cli/integration_test.go +++ b/cli/integration_test.go @@ -109,7 +109,7 @@ func TestGet(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if _,err := Get(tt.args.a, tt.args.u, tt.args.p, tt.args.args...); (err != nil) != tt.wantErr { + if _, err := Get(tt.args.a, tt.args.u, tt.args.p, tt.args.args...); (err != nil) != tt.wantErr { t.Errorf("Get() error = %v, wantErr %v", err, tt.wantErr) } }) diff --git a/cmd/get.go b/cmd/get.go index 46a709e6d..e2d42d80c 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -42,7 +42,7 @@ var getCmd = &cobra.Command{ Short: "get request", Long: `Sends a gNMI Get request to the specified target and prints the response to stdout`, RunE: func(cmd *cobra.Command, args []string) error { - _,err := cli.Get(address, username, password, args...) + _, err := cli.Get(address, username, password, args...) return err }, } diff --git a/nucleus/controller.go b/nucleus/controller.go index f9e2b6dd9..f9afc7e6b 100644 --- a/nucleus/controller.go +++ b/nucleus/controller.go @@ -26,10 +26,10 @@ var c *Core func init() { c = &Core{ - database: database.Database{}, - pndc: pndStore{}, - sbic: sbiStore{}, - stopChan: make(chan os.Signal, 1), + database: database.Database{}, + pndc: pndStore{}, + sbic: sbiStore{}, + stopChan: make(chan os.Signal, 1), } // Setting up signal capturing @@ -106,7 +106,7 @@ func Run(ctx context.Context) error { } } -func shutdown()error{ +func shutdown() error { log.Info("shutting down controller") return stopHttpServer() -} \ No newline at end of file +} -- GitLab