diff --git a/cli/get.go b/cli/get.go index f2b2e6e80aff4e1e8a53b2d61e2d339524df0bdd..ccd8b25a464dab88bb3e9b57ce921524de2f16b7 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 98de27882a8ca6cb6100c2c72d402c8d2a7de897..85a8208c37c6045b7f8a6e72b0bab8fdb0d18579 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 46a709e6d1d87e7497942ab3a902ccdac029c1bb..e2d42d80cd7697fef0d59c24615cc696d8e9f266 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 f9e2b6dd968e54172a8a1db92fe5850f107dfa5d..f9afc7e6baf7979ffc633bdc0cf58ab84358efc6 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 +}