comparison pkg/auth/opendb.go @ 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 a0892b578553
children c64dba002726
comparison
equal deleted inserted replaced
4159:80e9cfb2be98 4160:7cccf7fef3e8
26 "gemma.intevation.de/gemma/pkg/config" 26 "gemma.intevation.de/gemma/pkg/config"
27 ) 27 )
28 28
29 var ( 29 var (
30 // ErrNoMetamorphUser is returned if no metamorphic user is configured. 30 // ErrNoMetamorphUser is returned if no metamorphic user is configured.
31 ErrNoMetamorphUser = errors.New("No metamorphic user configured") 31 ErrNoMetamorphUser = errors.New("no metamorphic user configured")
32 // ErrNotLoggedIn is returned if there is the user is not logged in. 32 // ErrNotLoggedIn is returned if there is the user is not logged in.
33 ErrNotLoggedIn = errors.New("Not logged in") 33 ErrNotLoggedIn = errors.New("not logged in")
34 ) 34 )
35 35
36 // OpenDB opens up a database connection with a given username and password. 36 // OpenDB opens up a database connection with a given username and password.
37 // The other credentials are taken from the configuration. 37 // The other credentials are taken from the configuration.
38 func OpenDB(user, password string) (*sql.DB, error) { 38 func OpenDB(user, password string) (*sql.DB, error) {