mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
fix: various lint issues (#2571)
Originally found by @jkroepke in: https://github.com/project-zot/zot/actions/runs/10056774230/job/27796324933?pr=2556 And https://github.com/project-zot/zot/pull/2556 in general This commit covers: - (canonicalheader) capitalization of Docker-Content-Digest header - (protogetter) the proto getters were not used, they check for nil pointers, we should switch to using them - (zerologlint) fix the false positive Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ func SessionLogger(ctlr *Controller) mux.MiddlewareFunc {
|
||||
clientIP := request.RemoteAddr
|
||||
method := request.Method
|
||||
headers := map[string][]string{}
|
||||
log := logger.Info()
|
||||
log := logger.Info() //nolint: zerologlint // false positive, the Msg call is below
|
||||
for key, value := range request.Header {
|
||||
if key == "Authorization" { // anonymize from logs
|
||||
s := strings.SplitN(value[0], " ", 2) //nolint:gomnd
|
||||
|
||||
Reference in New Issue
Block a user