changeset 4160:7cccf7fef3e8

Made 'golint' and 'staticcheck' happy with auth package.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 02 Aug 2019 17:08:58 +0200
parents 80e9cfb2be98
children 64cd18281c76
files cmd/gemma/main.go pkg/auth/opendb.go pkg/auth/session.go pkg/auth/store.go
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/cmd/gemma/main.go	Fri Aug 02 16:37:24 2019 +0200
+++ b/cmd/gemma/main.go	Fri Aug 02 17:08:58 2019 +0200
@@ -58,7 +58,7 @@
 	// Do GeoServer setup in background.
 	geoserver.Reconfigure(geoserver.PrepareGeoServer)
 
-	// Log what it is rgistered to the import queue and scheduler.
+	// Log what's registered to the import queue and scheduler.
 	imports.LogImportKindNames()
 	scheduler.LogActionNames()
 
--- a/pkg/auth/opendb.go	Fri Aug 02 16:37:24 2019 +0200
+++ b/pkg/auth/opendb.go	Fri Aug 02 17:08:58 2019 +0200
@@ -28,9 +28,9 @@
 
 var (
 	// ErrNoMetamorphUser is returned if no metamorphic user is configured.
-	ErrNoMetamorphUser = errors.New("No metamorphic user configured")
+	ErrNoMetamorphUser = errors.New("no metamorphic user configured")
 	// ErrNotLoggedIn is returned if there is the user is not logged in.
-	ErrNotLoggedIn = errors.New("Not logged in")
+	ErrNotLoggedIn = errors.New("not logged in")
 )
 
 // OpenDB opens up a database connection with a given username and password.
--- a/pkg/auth/session.go	Fri Aug 02 16:37:24 2019 +0200
+++ b/pkg/auth/session.go	Fri Aug 02 17:08:58 2019 +0200
@@ -154,7 +154,7 @@
 }
 
 // ErrInvalidRole is returned if a given role does not exsist in this system.
-var ErrInvalidRole = errors.New("Invalid role")
+var ErrInvalidRole = errors.New("invalid role")
 
 // GenerateSession creates a new session for a given user and password
 // backed by the roles of this user in the database.
--- a/pkg/auth/store.go	Fri Aug 02 16:37:24 2019 +0200
+++ b/pkg/auth/store.go	Fri Aug 02 17:08:58 2019 +0200
@@ -25,7 +25,7 @@
 
 // ErrNoSuchToken is returned if a given token does not
 // exists th the session store.
-var ErrNoSuchToken = errors.New("No such token")
+var ErrNoSuchToken = errors.New("no such token")
 
 // Sessions is the global connection pool.
 var Sessions *SessionStore