Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Shushlin <v.shushlin@gmail.com>2021-12-06 16:24:20 +0300
committerVladimir Shushlin <v.shushlin@gmail.com>2021-12-07 12:07:31 +0300
commit0ab62643e5b61daf82ecf5a2c1ed196796059514 (patch)
tree87c3aad7e854a40b86ca1c0578d20135965cddd4 /internal
parentd228c13c76d11091f8514e40940dc7df1b633e5a (diff)
refactor: enable unparam in .golangci.yml
and fix offences
Diffstat (limited to 'internal')
-rw-r--r--internal/auth/auth.go4
-rw-r--r--internal/vfs/zip/vfs.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/auth/auth.go b/internal/auth/auth.go
index 07af99fe..05f58187 100644
--- a/internal/auth/auth.go
+++ b/internal/auth/auth.go
@@ -283,7 +283,7 @@ func (a *Auth) handleProxyingAuth(session *sessions.Session, w http.ResponseWrit
// If auth request callback should be proxied to custom domain
// redirect to originating domain set in the cookie as proxy_auth_domain
- if shouldProxyCallbackToCustomDomain(r, session) {
+ if shouldProxyCallbackToCustomDomain(session) {
// Get domain started auth process
proxyDomain := session.Values["proxy_auth_domain"].(string)
@@ -348,7 +348,7 @@ func shouldProxyAuthToGitlab(r *http.Request) bool {
return r.URL.Query().Get("domain") != "" && r.URL.Query().Get("state") != ""
}
-func shouldProxyCallbackToCustomDomain(r *http.Request, session *sessions.Session) bool {
+func shouldProxyCallbackToCustomDomain(session *sessions.Session) bool {
return session.Values["proxy_auth_domain"] != nil
}
diff --git a/internal/vfs/zip/vfs.go b/internal/vfs/zip/vfs.go
index a9825190..18078915 100644
--- a/internal/vfs/zip/vfs.go
+++ b/internal/vfs/zip/vfs.go
@@ -200,7 +200,7 @@ func (zfs *zipVFS) Name() string {
// otherwise creates the archive entry in a cache and try to save it,
// if saving fails it's because the archive has already been cached
// (e.g. by another concurrent request)
-func (zfs *zipVFS) findOrCreateArchive(ctx context.Context, key string) (*zipArchive, error) {
+func (zfs *zipVFS) findOrCreateArchive(key string) (*zipArchive, error) {
// This needs to happen in lock to ensure that
// concurrent access will not remove it
// it is needed due to the bug https://github.com/patrickmn/go-cache/issues/48
@@ -259,7 +259,7 @@ func (zfs *zipVFS) findOrCreateArchive(ctx context.Context, key string) (*zipArc
// findOrOpenArchive gets archive from cache and tries to open it
func (zfs *zipVFS) findOrOpenArchive(ctx context.Context, key, path string) (*zipArchive, error) {
- zipArchive, err := zfs.findOrCreateArchive(ctx, key)
+ zipArchive, err := zfs.findOrCreateArchive(key)
if err != nil {
return nil, err
}