From b2017651af41a10189c4c0b039c42a9c178e121f Mon Sep 17 00:00:00 2001
From: Manuel Kieweg <manuel.kieweg@h-da.de>
Date: Mon, 29 Mar 2021 15:18:48 +0100
Subject: [PATCH] go fmt

---
 nucleus/controller_test.go | 26 +++++++++++++-------------
 nucleus/gnmi_transport.go  |  2 +-
 nucleus/initialise_test.go |  1 -
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/nucleus/controller_test.go b/nucleus/controller_test.go
index c414d6c61..0e5fc9596 100644
--- a/nucleus/controller_test.go
+++ b/nucleus/controller_test.go
@@ -12,29 +12,29 @@ func TestRun(t *testing.T) {
 		request string
 	}
 	tests := []struct {
-		name    string
-		args    args
-		want    interface{}
+		name string
+		args args
+		want interface{}
 	}{
 		{
-			name:    "liveliness indicator",
-			args:    args{request: apiEndpoint + "/livez"},
-			want:    http.StatusOK,
+			name: "liveliness indicator",
+			args: args{request: apiEndpoint + "/livez"},
+			want: http.StatusOK,
 		},
 		{
-			name:    "readyness indicator",
-			args:    args{request: apiEndpoint + "/readyz"},
-			want:    http.StatusOK,
+			name: "readyness indicator",
+			args: args{request: apiEndpoint + "/readyz"},
+			want: http.StatusOK,
 		},
 		{
-			name:    "init",
-			args:    args{request: apiEndpoint + "/api?q=init"},
-			want:    http.StatusOK,
+			name: "init",
+			args: args{request: apiEndpoint + "/api?q=init"},
+			want: http.StatusOK,
 		},
 	}
 	ctx, cancel := context.WithCancel(context.Background())
 	go func() {
-		if err := Run(ctx); err != nil{
+		if err := Run(ctx); err != nil {
 			t.Errorf("Run() error = %v", err)
 		}
 	}()
diff --git a/nucleus/gnmi_transport.go b/nucleus/gnmi_transport.go
index a5d6a5fc3..3bbcc03c6 100644
--- a/nucleus/gnmi_transport.go
+++ b/nucleus/gnmi_transport.go
@@ -233,7 +233,7 @@ func (g *Gnmi) set(ctx context.Context, setOps []*gnmi.Operation,
 func (g *Gnmi) subscribe(ctx context.Context) error {
 	ctx = gnmi.NewContext(ctx, &g.Options.Config)
 	opts, ok := ctx.Value(CtxKeyOpts).(*gnmi.SubscribeOptions)
-	if !ok{
+	if !ok {
 		return &ErrInvalidTypeAssertion{
 			v: reflect.TypeOf(ctx.Value(CtxKeyOpts)),
 			t: reflect.TypeOf(&gnmi.SubscribeOptions{}),
diff --git a/nucleus/initialise_test.go b/nucleus/initialise_test.go
index 16e0f2f02..d2fe0a04b 100644
--- a/nucleus/initialise_test.go
+++ b/nucleus/initialise_test.go
@@ -46,7 +46,6 @@ var gnmiAddress = "141.100.70.171:6030"
 func TestMain(m *testing.M) {
 	log.SetReportCaller(true)
 
-
 	if os.Getenv("GOSDN_LOG") == "nolog" {
 		log.SetLevel(log.PanicLevel)
 	}
-- 
GitLab