Remove unused code (fixed: unused, structcheck, deadcode linters)
This commit is contained in:
parent
e0f927c7a9
commit
8c3dc0ca66
@ -16,10 +16,7 @@ linters:
|
||||
- wsl
|
||||
|
||||
# TODO: fix me
|
||||
- unused
|
||||
- structcheck
|
||||
- stylecheck
|
||||
- deadcode
|
||||
- misspell
|
||||
- unparam
|
||||
- goimports
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user