From 82dd944f0afda3c8591181e5e25b27fd7a8a4ef2 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sat, 28 Nov 2026 02:10:13 +0000 Subject: [PATCH] style(auth): order authStore fields for fieldalignment golangci-lint's fieldalignment check reported 240 leading pointer bytes on authStore where 232 is optimal. The bool anonymousAnyKey moves next to the mutexes. No behaviour change. --- auth.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/auth.go b/auth.go index 1173173..9f93ddc 100644 --- a/auth.go +++ b/auth.go @@ -731,16 +731,16 @@ type authStore struct { inline map[[32]byte]*authEntry // anonymous is the principal for keyless requests; nil unless // UsersConfig.AnonymousGroup is set. - anonymous *authEntry - // anonymousAnyKey admits an unknown key as anonymous instead of 401. - anonymousAnyKey bool + anonymous *authEntry lastReloadErrMsg string failureLog logGate throttleLog logGate fileUserCount int - mu sync.RWMutex - buildMu sync.Mutex - reloadMu sync.Mutex + // anonymousAnyKey admits an unknown key as anonymous instead of 401. + anonymousAnyKey bool + mu sync.RWMutex + buildMu sync.Mutex + reloadMu sync.Mutex } // newAuthStore builds an authStore from cfg's groups and inline users. It