mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +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:
@@ -307,7 +307,7 @@ func fetchImageIndexStruct(ctx context.Context, job *httpJob) (*imageStruct, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
indexDigest := header.Get("docker-content-digest")
|
||||
indexDigest := header.Get("Docker-Content-Digest")
|
||||
|
||||
indexSize, err := strconv.ParseInt(header.Get("Content-Length"), 10, 64)
|
||||
if err != nil {
|
||||
@@ -398,7 +398,7 @@ func fetchManifestStruct(ctx context.Context, repo, manifestReference string, se
|
||||
return common.ManifestSummary{}, err
|
||||
}
|
||||
|
||||
manifestDigest := header.Get("docker-content-digest")
|
||||
manifestDigest := header.Get("Docker-Content-Digest")
|
||||
configDigest := manifestResp.Config.Digest.String()
|
||||
|
||||
configContent, err := fetchConfig(ctx, repo, configDigest, searchConf, username, password)
|
||||
|
||||
Reference in New Issue
Block a user