From 8c3dc0ca66e86d0af52bc0f056aaf0ddb3fe8c2a Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Wed, 18 Dec 2019 15:46:49 +0100 Subject: [PATCH] Remove unused code (fixed: unused, structcheck, deadcode linters) --- .golangci.yml | 3 --- connector/google/google.go | 1 - server/templates.go | 13 ------------- 3 files changed, 17 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 824484d6..45cfc35f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,10 +16,7 @@ linters: - wsl # TODO: fix me - - unused - - structcheck - stylecheck - - deadcode - misspell - unparam - goimports diff --git a/connector/google/google.go b/connector/google/google.go index 84e5580d..7561ca4d 100644 --- a/connector/google/google.go +++ b/connector/google/google.go @@ -105,7 +105,6 @@ type googleConnector struct { redirectURI string oauth2Config *oauth2.Config verifier *oidc.IDTokenVerifier - ctx context.Context cancel context.CancelFunc logger log.Logger hostedDomains []string diff --git a/server/templates.go b/server/templates.go index 88aeace0..13dda8f1 100644 --- a/server/templates.go +++ b/server/templates.go @@ -47,19 +47,6 @@ type webConfig struct { extra map[string]string } -func join(base, path string) string { - b := strings.HasSuffix(base, "/") - p := strings.HasPrefix(path, "/") - switch { - case b && p: - return base + path[1:] - case b || p: - return base + path - default: - return base + "/" + path - } -} - func dirExists(dir string) error { stat, err := os.Stat(dir) if err != nil {