aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/packages
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-09-05 17:58:30 +0200
committerGitHub <noreply@github.com>2023-09-05 15:58:30 +0000
commit0eebeeec9045c759d005ab0ba87f3275da7c627d (patch)
treea8ca74d22821ff8002781cf9d5c21ebaa0001010 /routers/api/packages
parenta99b96cbcd10e4cad3194c142a0fffe371959455 (diff)
downloadgitea-0eebeeec9045c759d005ab0ba87f3275da7c627d.tar.gz
gitea-0eebeeec9045c759d005ab0ba87f3275da7c627d.zip
Remove `Named` interface (#26913)
`Named` is implemented by every `Method` and future implementations should implement the method too.
Diffstat (limited to 'routers/api/packages')
-rw-r--r--routers/api/packages/chef/auth.go2
-rw-r--r--routers/api/packages/conan/auth.go2
-rw-r--r--routers/api/packages/container/auth.go2
-rw-r--r--routers/api/packages/nuget/auth.go2
4 files changed, 8 insertions, 0 deletions
diff --git a/routers/api/packages/chef/auth.go b/routers/api/packages/chef/auth.go
index 1ea453f1f4..d895640894 100644
--- a/routers/api/packages/chef/auth.go
+++ b/routers/api/packages/chef/auth.go
@@ -36,6 +36,8 @@ var (
algorithmPattern = regexp.MustCompile(`algorithm=(\w+)`)
versionPattern = regexp.MustCompile(`version=(\d+\.\d+)`)
authorizationPattern = regexp.MustCompile(`\AX-Ops-Authorization-(\d+)`)
+
+ _ auth.Method = &Auth{}
)
// Documentation:
diff --git a/routers/api/packages/conan/auth.go b/routers/api/packages/conan/auth.go
index ca02d61e76..521fa12372 100644
--- a/routers/api/packages/conan/auth.go
+++ b/routers/api/packages/conan/auth.go
@@ -12,6 +12,8 @@ import (
"code.gitea.io/gitea/services/packages"
)
+var _ auth.Method = &Auth{}
+
type Auth struct{}
func (a *Auth) Name() string {
diff --git a/routers/api/packages/container/auth.go b/routers/api/packages/container/auth.go
index 6fb32c389d..1c7afa95ff 100644
--- a/routers/api/packages/container/auth.go
+++ b/routers/api/packages/container/auth.go
@@ -12,6 +12,8 @@ import (
"code.gitea.io/gitea/services/packages"
)
+var _ auth.Method = &Auth{}
+
type Auth struct{}
func (a *Auth) Name() string {
diff --git a/routers/api/packages/nuget/auth.go b/routers/api/packages/nuget/auth.go
index 54b33d89c0..60b81b8d4b 100644
--- a/routers/api/packages/nuget/auth.go
+++ b/routers/api/packages/nuget/auth.go
@@ -13,6 +13,8 @@ import (
"code.gitea.io/gitea/services/auth"
)
+var _ auth.Method = &Auth{}
+
type Auth struct{}
func (a *Auth) Name() string {