From 0eebeeec9045c759d005ab0ba87f3275da7c627d Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Tue, 5 Sep 2023 17:58:30 +0200 Subject: Remove `Named` interface (#26913) `Named` is implemented by every `Method` and future implementations should implement the method too. --- routers/api/packages/chef/auth.go | 2 ++ routers/api/packages/conan/auth.go | 2 ++ routers/api/packages/container/auth.go | 2 ++ routers/api/packages/nuget/auth.go | 2 ++ 4 files changed, 8 insertions(+) (limited to 'routers/api/packages') 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 { -- cgit v1.2.3