Skip to content
Snippets Groups Projects
Commit 890f7094 authored by Malte Bauch's avatar Malte Bauch
Browse files

gofmt

parent c53dc06f
No related branches found
No related tags found
2 merge requests!120Resolve "Code Quality",!90Develop
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
) )
// Get sends a gNMI Get request to the specified target and prints the response to stdout // 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{} sbi := &nucleus.OpenConfig{}
opts := &nucleus.GnmiTransportOptions{ opts := &nucleus.GnmiTransportOptions{
Config: gnmi.Config{ Config: gnmi.Config{
...@@ -22,7 +22,7 @@ func Get(a, u, p string, args ...string) (*gpb.GetResponse,error) { ...@@ -22,7 +22,7 @@ func Get(a, u, p string, args ...string) (*gpb.GetResponse,error) {
} }
t, err := nucleus.NewGnmiTransport(opts) t, err := nucleus.NewGnmiTransport(opts)
if err != nil { if err != nil {
return nil,err return nil, err
} }
resp, err := t.Get(context.Background(), args...) resp, err := t.Get(context.Background(), args...)
if err != nil { if err != nil {
......
...@@ -109,7 +109,7 @@ func TestGet(t *testing.T) { ...@@ -109,7 +109,7 @@ func TestGet(t *testing.T) {
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { 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) t.Errorf("Get() error = %v, wantErr %v", err, tt.wantErr)
} }
}) })
......
...@@ -42,7 +42,7 @@ var getCmd = &cobra.Command{ ...@@ -42,7 +42,7 @@ var getCmd = &cobra.Command{
Short: "get request", Short: "get request",
Long: `Sends a gNMI Get request to the specified target and prints the response to stdout`, Long: `Sends a gNMI Get request to the specified target and prints the response to stdout`,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
_,err := cli.Get(address, username, password, args...) _, err := cli.Get(address, username, password, args...)
return err return err
}, },
} }
......
...@@ -26,10 +26,10 @@ var c *Core ...@@ -26,10 +26,10 @@ var c *Core
func init() { func init() {
c = &Core{ c = &Core{
database: database.Database{}, database: database.Database{},
pndc: pndStore{}, pndc: pndStore{},
sbic: sbiStore{}, sbic: sbiStore{},
stopChan: make(chan os.Signal, 1), stopChan: make(chan os.Signal, 1),
} }
// Setting up signal capturing // Setting up signal capturing
...@@ -106,7 +106,7 @@ func Run(ctx context.Context) error { ...@@ -106,7 +106,7 @@ func Run(ctx context.Context) error {
} }
} }
func shutdown()error{ func shutdown() error {
log.Info("shutting down controller") log.Info("shutting down controller")
return stopHttpServer() return stopHttpServer()
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment