mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
chore: update golangci-lint and fix all issues (#3575)
* chore: Update golangci-lint Signed-off-by: Lars Francke <git@lars-francke.de> * chore: fix all golangci-lint issues - Remove deprecated `// +build` tags - Fix godoclint, modernize, wsl_v5, govet, lll, gci, noctx issues - Update linter configuration - Modernize code to use Go 1.22+ features (for range N, slices.Contains, etc.) - Update make check lint the privileged tests Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com> --------- Signed-off-by: Lars Francke <git@lars-francke.de> Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com> Co-authored-by: Lars Francke <git@lars-francke.de>
This commit is contained in:
@@ -23,17 +23,19 @@ const (
|
||||
APIKeysPrefix = "zak_"
|
||||
CallbackUIQueryParam = "callback_ui"
|
||||
APIKeyTimeFormat = time.RFC3339
|
||||
// authz permissions.
|
||||
// method actions.
|
||||
// CreatePermission is an authz permission for create actions.
|
||||
CreatePermission = "create"
|
||||
ReadPermission = "read"
|
||||
// ReadPermission is an authz permission for read actions.
|
||||
ReadPermission = "read"
|
||||
// UpdatePermission is an authz permission for update actions.
|
||||
UpdatePermission = "update"
|
||||
// DeletePermission is an authz permission for delete actions.
|
||||
DeletePermission = "delete"
|
||||
// behaviour actions.
|
||||
// DetectManifestCollisionPermission is a behaviour action.
|
||||
DetectManifestCollisionPermission = "detectManifestCollision"
|
||||
// zot scale-out hop count header.
|
||||
// ScaleOutHopCountHeader is the zot scale-out hop count header.
|
||||
ScaleOutHopCountHeader = "X-Zot-Cluster-Hop-Count"
|
||||
// log string keys.
|
||||
// these can be used together with the logger to add context to a log message.
|
||||
// RepositoryLogKey is a log string key.
|
||||
// These can be used together with the logger to add context to a log message.
|
||||
RepositoryLogKey = "repository"
|
||||
)
|
||||
|
||||
@@ -7,21 +7,21 @@ const (
|
||||
|
||||
BaseExtension = "_zot"
|
||||
|
||||
// zot specific extensions.
|
||||
// BasePrefix is a zot specific extension.
|
||||
BasePrefix = "/_zot"
|
||||
ExtPrefix = BasePrefix + "/ext"
|
||||
|
||||
// search extension.
|
||||
// ExtSearch is the search extension.
|
||||
ExtSearch = "/search"
|
||||
ExtSearchPrefix = ExtPrefix + ExtSearch
|
||||
FullSearchPrefix = RoutePrefix + ExtSearchPrefix
|
||||
|
||||
// mgmt extension.
|
||||
// Mgmt is the mgmt extension.
|
||||
Mgmt = "/mgmt"
|
||||
ExtMgmt = ExtPrefix + Mgmt
|
||||
FullMgmt = RoutePrefix + ExtMgmt
|
||||
|
||||
// signatures extension.
|
||||
// Notation is the signatures extension.
|
||||
Notation = "/notation"
|
||||
ExtNotation = ExtPrefix + Notation
|
||||
FullNotation = RoutePrefix + ExtNotation
|
||||
@@ -29,7 +29,7 @@ const (
|
||||
ExtCosign = ExtPrefix + Cosign
|
||||
FullCosign = RoutePrefix + ExtCosign
|
||||
|
||||
// user preferences extension.
|
||||
// UserPrefs is the user preferences extension.
|
||||
UserPrefs = "/userprefs"
|
||||
ExtUserPrefs = ExtPrefix + UserPrefs
|
||||
FullUserPrefs = RoutePrefix + ExtUserPrefs
|
||||
|
||||
Reference in New Issue
Block a user