diff --git a/cmd/dex/config_test.go b/cmd/dex/config_test.go
index bced93b5d9dd12697f3fad4e5b44a000616a5b97..278a91156a1cc33ddb25a6941a67da386e7beaad 100644
--- a/cmd/dex/config_test.go
+++ b/cmd/dex/config_test.go
@@ -59,6 +59,7 @@ func TestInvalidConfiguration(t *testing.T) {
 		t.Fatalf("Expected error message to be %q, got %q", wanted, got)
 	}
 }
+
 func TestUnmarshalConfig(t *testing.T) {
 	rawConfig := []byte(`
 issuer: http://127.0.0.1:5556/dex
diff --git a/connector/github/github.go b/connector/github/github.go
index 6b95ea8f9ff39efa91f14128d7a00e0a73423228..02f2cae8048967cc2fc944303ee689254efc8fef 100644
--- a/connector/github/github.go
+++ b/connector/github/github.go
@@ -35,8 +35,10 @@ const (
 
 // Pagination URL patterns
 // https://developer.github.com/v3/#pagination
-var reNext = regexp.MustCompile("<([^>]+)>; rel=\"next\"")
-var reLast = regexp.MustCompile("<([^>]+)>; rel=\"last\"")
+var (
+	reNext = regexp.MustCompile("<([^>]+)>; rel=\"next\"")
+	reLast = regexp.MustCompile("<([^>]+)>; rel=\"last\"")
+)
 
 // Config holds configuration options for github logins.
 type Config struct {
@@ -626,7 +628,6 @@ func (c *githubConnector) userInOrg(ctx context.Context, client *http.Client, us
 	apiURL := fmt.Sprintf("%s/orgs/%s/members/%s", c.apiURL, orgName, userName)
 
 	req, err := http.NewRequest("GET", apiURL, nil)
-
 	if err != nil {
 		return false, fmt.Errorf("github: new req: %v", err)
 	}
diff --git a/connector/keystone/keystone.go b/connector/keystone/keystone.go
index 92682f78c0753988c8d14aee19b1bbcd1f05bea2..d817bd9454a9e8f3e6b268339d3d273fb7d62474 100644
--- a/connector/keystone/keystone.go
+++ b/connector/keystone/keystone.go
@@ -115,7 +115,8 @@ func (c *Config) Open(id string, logger log.Logger) (connector.Connector, error)
 		c.Host,
 		c.AdminUsername,
 		c.AdminPassword,
-		logger}, nil
+		logger,
+	}, nil
 }
 
 func (p *conn) Close() error { return nil }
@@ -137,7 +138,7 @@ func (p *conn) Login(ctx context.Context, scopes connector.Scopes, username, pas
 		return identity, false, err
 	}
 	defer resp.Body.Close()
-	var tokenResp = new(tokenResponse)
+	tokenResp := new(tokenResponse)
 	err = json.Unmarshal(data, &tokenResp)
 	if err != nil {
 		return identity, false, fmt.Errorf("keystone: invalid token response: %v", err)
@@ -295,7 +296,7 @@ func (p *conn) getUserGroups(ctx context.Context, userID string, token string) (
 	}
 	defer resp.Body.Close()
 
-	var groupsResp = new(groupsResponse)
+	groupsResp := new(groupsResponse)
 
 	err = json.Unmarshal(data, &groupsResp)
 	if err != nil {
diff --git a/connector/keystone/keystone_test.go b/connector/keystone/keystone_test.go
index d66da8bece89e41490f4a03aed39be2f6863b6d4..b138012426e219d88f7c13ace1c324a3c324e735 100644
--- a/connector/keystone/keystone_test.go
+++ b/connector/keystone/keystone_test.go
@@ -84,7 +84,7 @@ func getAdminToken(t *testing.T, adminName, adminPass string) (token, id string)
 	}
 	defer resp.Body.Close()
 
-	var tokenResp = new(tokenResponse)
+	tokenResp := new(tokenResponse)
 	err = json.Unmarshal(data, &tokenResp)
 	if err != nil {
 		t.Fatal(err)
@@ -128,7 +128,7 @@ func createUser(t *testing.T, token, userName, userEmail, userPass string) strin
 	}
 	defer resp.Body.Close()
 
-	var userResp = new(userResponse)
+	userResp := new(userResponse)
 	err = json.Unmarshal(data, &userResp)
 	if err != nil {
 		t.Fatal(err)
@@ -189,7 +189,7 @@ func createGroup(t *testing.T, token, description, name string) string {
 	}
 	defer resp.Body.Close()
 
-	var groupResp = new(groupResponse)
+	groupResp := new(groupResponse)
 	err = json.Unmarshal(data, &groupResp)
 	if err != nil {
 		t.Fatal(err)
@@ -219,8 +219,10 @@ func addUserToGroup(t *testing.T, token, groupID, userID string) error {
 
 func TestIncorrectCredentialsLogin(t *testing.T) {
 	setupVariables(t)
-	c := conn{Host: keystoneURL, Domain: testDomain,
-		AdminUsername: adminUser, AdminPassword: adminPass}
+	c := conn{
+		Host: keystoneURL, Domain: testDomain,
+		AdminUsername: adminUser, AdminPassword: adminPass,
+	}
 	s := connector.Scopes{OfflineAccess: true, Groups: true}
 	_, validPW, err := c.Login(context.Background(), s, adminUser, invalidPass)
 
@@ -254,7 +256,7 @@ func TestValidUserLogin(t *testing.T) {
 		verifiedEmail bool
 	}
 
-	var tests = []struct {
+	tests := []struct {
 		name     string
 		input    tUser
 		expected expect
@@ -294,8 +296,10 @@ func TestValidUserLogin(t *testing.T) {
 			userID := createUser(t, token, tt.input.username, tt.input.email, tt.input.password)
 			defer deleteResource(t, token, userID, usersURL)
 
-			c := conn{Host: keystoneURL, Domain: tt.input.domain,
-				AdminUsername: adminUser, AdminPassword: adminPass}
+			c := conn{
+				Host: keystoneURL, Domain: tt.input.domain,
+				AdminUsername: adminUser, AdminPassword: adminPass,
+			}
 			s := connector.Scopes{OfflineAccess: true, Groups: true}
 			identity, validPW, err := c.Login(context.Background(), s, tt.input.username, tt.input.password)
 			if err != nil {
@@ -329,8 +333,10 @@ func TestUseRefreshToken(t *testing.T) {
 	addUserToGroup(t, token, groupID, adminID)
 	defer deleteResource(t, token, groupID, groupsURL)
 
-	c := conn{Host: keystoneURL, Domain: testDomain,
-		AdminUsername: adminUser, AdminPassword: adminPass}
+	c := conn{
+		Host: keystoneURL, Domain: testDomain,
+		AdminUsername: adminUser, AdminPassword: adminPass,
+	}
 	s := connector.Scopes{OfflineAccess: true, Groups: true}
 
 	identityLogin, _, err := c.Login(context.Background(), s, adminUser, adminPass)
@@ -352,8 +358,10 @@ func TestUseRefreshTokenUserDeleted(t *testing.T) {
 	token, _ := getAdminToken(t, adminUser, adminPass)
 	userID := createUser(t, token, testUser, testEmail, testPass)
 
-	c := conn{Host: keystoneURL, Domain: testDomain,
-		AdminUsername: adminUser, AdminPassword: adminPass}
+	c := conn{
+		Host: keystoneURL, Domain: testDomain,
+		AdminUsername: adminUser, AdminPassword: adminPass,
+	}
 	s := connector.Scopes{OfflineAccess: true, Groups: true}
 
 	identityLogin, _, err := c.Login(context.Background(), s, testUser, testPass)
@@ -380,8 +388,10 @@ func TestUseRefreshTokenGroupsChanged(t *testing.T) {
 	userID := createUser(t, token, testUser, testEmail, testPass)
 	defer deleteResource(t, token, userID, usersURL)
 
-	c := conn{Host: keystoneURL, Domain: testDomain,
-		AdminUsername: adminUser, AdminPassword: adminPass}
+	c := conn{
+		Host: keystoneURL, Domain: testDomain,
+		AdminUsername: adminUser, AdminPassword: adminPass,
+	}
 	s := connector.Scopes{OfflineAccess: true, Groups: true}
 
 	identityLogin, _, err := c.Login(context.Background(), s, testUser, testPass)
@@ -414,8 +424,10 @@ func TestNoGroupsInScope(t *testing.T) {
 	userID := createUser(t, token, testUser, testEmail, testPass)
 	defer deleteResource(t, token, userID, usersURL)
 
-	c := conn{Host: keystoneURL, Domain: testDomain,
-		AdminUsername: adminUser, AdminPassword: adminPass}
+	c := conn{
+		Host: keystoneURL, Domain: testDomain,
+		AdminUsername: adminUser, AdminPassword: adminPass,
+	}
 	s := connector.Scopes{OfflineAccess: true, Groups: false}
 
 	groupID := createGroup(t, token, "Test group", testGroup)
diff --git a/connector/openshift/openshift.go b/connector/openshift/openshift.go
index 06669356201bfcaf48d0547bac60430a021f565e..f06e8f8045e818c4858122c181ea60a4c6f873a2 100644
--- a/connector/openshift/openshift.go
+++ b/connector/openshift/openshift.go
@@ -12,13 +12,12 @@ import (
 	"strings"
 	"time"
 
+	"golang.org/x/oauth2"
+
 	"github.com/dexidp/dex/connector"
 	"github.com/dexidp/dex/pkg/groups"
 	"github.com/dexidp/dex/pkg/log"
-
 	"github.com/dexidp/dex/storage/kubernetes/k8sapi"
-
-	"golang.org/x/oauth2"
 )
 
 // Config holds configuration options for OpenShift login
@@ -32,9 +31,7 @@ type Config struct {
 	RootCA       string   `json:"rootCA"`
 }
 
-var (
-	_ connector.CallbackConnector = (*openshiftConnector)(nil)
-)
+var _ connector.CallbackConnector = (*openshiftConnector)(nil)
 
 type openshiftConnector struct {
 	apiURL       string
@@ -89,7 +86,6 @@ func (c *Config) Open(id string, logger log.Logger) (conn connector.Connector, e
 	}
 
 	resp, err := openshiftConnector.httpClient.Do(req.WithContext(ctx))
-
 	if err != nil {
 		cancel()
 		return nil, fmt.Errorf("failed to query OpenShift endpoint %v", err)
@@ -160,7 +156,6 @@ func (c *openshiftConnector) HandleCallback(s connector.Scopes, r *http.Request)
 	client := c.oauth2Config.Client(ctx, token)
 
 	user, err := c.user(ctx, client)
-
 	if err != nil {
 		return identity, fmt.Errorf("openshift: get user: %v", err)
 	}
diff --git a/connector/openshift/openshift_test.go b/connector/openshift/openshift_test.go
index d4efa14d840c8badc1daa771dd1da3891543e06c..90f1686c408be9f40550bf8247d297d5b807b0f1 100644
--- a/connector/openshift/openshift_test.go
+++ b/connector/openshift/openshift_test.go
@@ -10,12 +10,11 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/dexidp/dex/connector"
-
-	"github.com/dexidp/dex/storage/kubernetes/k8sapi"
-
 	"github.com/sirupsen/logrus"
 	"golang.org/x/oauth2"
+
+	"github.com/dexidp/dex/connector"
+	"github.com/dexidp/dex/storage/kubernetes/k8sapi"
 )
 
 func TestOpen(t *testing.T) {
diff --git a/server/api.go b/server/api.go
index c815ada41f4182367c9925f8772d3f28bfb913ba..98fd20b895058570cb6893af39d6f574b127a8ee 100644
--- a/server/api.go
+++ b/server/api.go
@@ -96,7 +96,6 @@ func (d dexAPI) UpdateClient(ctx context.Context, req *api.UpdateClientReq) (*ap
 		}
 		return old, nil
 	})
-
 	if err != nil {
 		if err == storage.ErrNotFound {
 			return &api.UpdateClientResp{NotFound: true}, nil
diff --git a/storage/conformance/conformance.go b/storage/conformance/conformance.go
index dd2083ae86d7cbb4905f7f59201e8cd568ee7b76..92611cc1f2dc3bdd8fee291d64b0ef24315ebfe3 100644
--- a/storage/conformance/conformance.go
+++ b/storage/conformance/conformance.go
@@ -7,13 +7,11 @@ import (
 	"testing"
 	"time"
 
-	jose "gopkg.in/square/go-jose.v2"
-
+	"github.com/kylelemons/godebug/pretty"
 	"golang.org/x/crypto/bcrypt"
+	jose "gopkg.in/square/go-jose.v2"
 
 	"github.com/dexidp/dex/storage"
-
-	"github.com/kylelemons/godebug/pretty"
 )
 
 // ensure that values being tested on never expire.
diff --git a/storage/etcd/config.go b/storage/etcd/config.go
index e294a53a4e55ce4c53e7b5ccd46cf4c60b5391fa..14607316d22db441992f58dc61de5e18cecfbc66 100644
--- a/storage/etcd/config.go
+++ b/storage/etcd/config.go
@@ -11,9 +11,7 @@ import (
 	"github.com/dexidp/dex/storage"
 )
 
-var (
-	defaultDialTimeout = 2 * time.Second
-)
+var defaultDialTimeout = 2 * time.Second
 
 // SSL represents SSL options for etcd databases.
 type SSL struct {
diff --git a/storage/sql/config_test.go b/storage/sql/config_test.go
index 4df32cf48cf34ee1720974fc0e59f528eb2c9380..2085bc8847632276b68f712e5184df3c30eb9eb2 100644
--- a/storage/sql/config_test.go
+++ b/storage/sql/config_test.go
@@ -34,8 +34,10 @@ func withTimeout(t time.Duration, f func()) {
 }
 
 func cleanDB(c *conn) error {
-	tables := []string{"client", "auth_request", "auth_code",
-		"refresh_token", "keys", "password"}
+	tables := []string{
+		"client", "auth_request", "auth_code",
+		"refresh_token", "keys", "password",
+	}
 
 	for _, tbl := range tables {
 		_, err := c.Exec("delete from " + tbl)
@@ -97,7 +99,7 @@ func getenv(key, defaultVal string) string {
 const testPostgresEnv = "DEX_POSTGRES_HOST"
 
 func TestCreateDataSourceName(t *testing.T) {
-	var testCases = []struct {
+	testCases := []struct {
 		description string
 		input       *Postgres
 		expected    string
diff --git a/storage/sql/crud.go b/storage/sql/crud.go
index dedfd2a805f83e113e50999bbe35c8c504030e4b..c804fc4306a5fd25d2a58e4843d1f3d53dd36db2 100644
--- a/storage/sql/crud.go
+++ b/storage/sql/crud.go
@@ -244,7 +244,6 @@ func (c *conn) CreateAuthCode(a storage.AuthCode) error {
 		encoder(a.Claims.Groups), a.ConnectorID, a.ConnectorData, a.Expiry,
 		a.PKCE.CodeChallenge, a.PKCE.CodeChallengeMethod,
 	)
-
 	if err != nil {
 		if c.alreadyExistsCheck(err) {
 			return storage.ErrAlreadyExists
diff --git a/storage/sql/migrate.go b/storage/sql/migrate.go
index 8201d443d43434b6d4cf33757a36fd5ab2ca3809..460658c2a0e2785cfdb97932baeae29973dd1ef1 100644
--- a/storage/sql/migrate.go
+++ b/storage/sql/migrate.go
@@ -82,7 +82,8 @@ type migration struct {
 // All SQL flavors share migration strategies.
 var migrations = []migration{
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			create table client (
 				id text not null primary key,
 				secret text not null,
@@ -170,7 +171,8 @@ var migrations = []migration{
 		},
 	},
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			alter table refresh_token
 				add column token text not null default '';`,
 			`
@@ -182,7 +184,8 @@ var migrations = []migration{
 		},
 	},
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			create table offline_session (
 				user_id text not null,
 				conn_id text not null,
@@ -192,7 +195,8 @@ var migrations = []migration{
 		},
 	},
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			create table connector (
 				id text not null primary key,
 				type text not null,
@@ -203,7 +207,8 @@ var migrations = []migration{
 		},
 	},
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			alter table auth_code
 				add column claims_preferred_username text not null default '';`,
 			`
@@ -215,14 +220,16 @@ var migrations = []migration{
 		},
 	},
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			alter table offline_session
 				add column connector_data bytea;
 			`,
 		},
 	},
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			alter table auth_request
 				modify column state varchar(4096);
 			`,
@@ -230,7 +237,8 @@ var migrations = []migration{
 		flavor: &flavorMySQL,
 	},
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			create table device_request (
 				user_code text not null primary key,
 				device_code text not null,
@@ -251,7 +259,8 @@ var migrations = []migration{
 		},
 	},
 	{
-		stmts: []string{`
+		stmts: []string{
+			`
 			alter table auth_request
 				add column code_challenge text not null default '';`,
 			`
diff --git a/storage/sql/postgres_test.go b/storage/sql/postgres_test.go
index 8071dc291f930f77d94be928d770c56c12876674..d58abc70bf2174793f71c573528da1d9ca907df6 100644
--- a/storage/sql/postgres_test.go
+++ b/storage/sql/postgres_test.go
@@ -34,7 +34,8 @@ func TestPostgresTunables(t *testing.T) {
 		},
 		SSL: SSL{
 			Mode: pgSSLDisable, // Postgres container doesn't support SSL.
-		}}
+		},
+	}
 
 	t.Run("with nothing set, uses defaults", func(t *testing.T) {
 		cfg := *baseCfg