Open platform to collect and prioritize feedback
minor go lint fixes (#237)
Guilherme Oenningff372069a99d
diff --git a/app/pkg/jsonq/jsonq.go b/app/pkg/jsonq/jsonq.goindex 3afabeefd..4f0e8f4f5 100644--- a/app/pkg/jsonq/jsonq.go+++ b/app/pkg/jsonq/jsonq.go@@ -5,10 +5,12 @@ import ("strings")+//Query is a JSON query interfacetype Query struct {m map[string]*json.RawMessage}+//New creates a new Query object based on given input as a JSONfunc New(content string) *Query {var m map[string]*json.RawMessageerr := json.Unmarshal([]byte(content), &m)@@ -18,6 +20,7 @@ func New(content string) *Query {return &Query{m: m}}+//String returns a string value from the json object based on its keyfunc (q *Query) String(key string) (string, error) {data := q.get(key)if data != nil {@@ -28,6 +31,7 @@ func (q *Query) String(key string) (string, error) {return "", nil}+//Contains returns true if the json object has the keyfunc (q *Query) Contains(key string) bool {return q.get(key) != nil}diff --git a/app/pkg/uuid/uuid.go b/app/pkg/uuid/uuid.goindex 295f3fc2c..f14fa94e1 100644--- a/app/pkg/uuid/uuid.go+++ b/app/pkg/uuid/uuid.go@@ -134,7 +134,7 @@ type NullUUID struct {Valid bool}-// The nil UUID is special form of UUID that is specified to have all+// Nil is the nil UUID is special form of UUID that is specified to have all// 128 bits set to zero.var Nil = UUID{}diff --git a/app/pkg/web/engine.go b/app/pkg/web/engine.goindex 9393b9cf6..80866d148 100644--- a/app/pkg/web/engine.go+++ b/app/pkg/web/engine.go@@ -58,9 +58,12 @@ func (e *Engine) Start(address string) {ErrorLog: stdLog.New(e.logger, "", 0),}- var err error+ var (+ err error+ certManager *CertificateManager+ )if autoSSL == "true" {- certManager, err := NewCertificateManager(certFile, keyFile, "certs")+ certManager, err = NewCertificateManager(certFile, keyFile, "certs")if err != nil {panic(err)}diff --git a/app/storage/postgres/user_test.go b/app/storage/postgres/user_test.goindex e3cb22e12..6a5ace9f6 100644--- a/app/storage/postgres/user_test.go+++ b/app/storage/postgres/user_test.go@@ -200,6 +200,7 @@ func TestUserStorage_UpdateSettings(t *testing.T) {Expect(err).To(BeNil())user, err := users.GetByEmail(1, "[email protected]")+ Expect(err).To(BeNil())Expect(user.Name).To(Equal("Jon Stark"))}@@ -212,6 +213,7 @@ func TestUserStorage_ChangeRole(t *testing.T) {Expect(err).To(BeNil())user, err := users.GetByEmail(1, "[email protected]")+ Expect(err).To(BeNil())Expect(user.Role).To(Equal(models.RoleVisitor))}