fix go.mod and lint issues

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-03-19 11:52:08 +01:00
parent bf95aa3dfa
commit 212d598ab1
12 changed files with 29 additions and 44 deletions

View File

@ -107,9 +107,7 @@ func (r *Resolver) Combine(ctx context.Context, srcs []*Source, ann map[exptypes
if old.Annotations == nil {
old.Annotations = map[string]string{}
}
for k, v := range d.Annotations {
old.Annotations[k] = v
}
maps.Copy(old.Annotations, d.Annotations)
newDescs[idx] = old
} else {
m[d.Digest] = len(newDescs)

View File

@ -6,6 +6,7 @@ import (
"context"
"encoding/base64"
"encoding/json"
"maps"
"regexp"
"sort"
"strings"
@ -126,13 +127,9 @@ func (l *loader) Load(ctx context.Context, ref string) (*result, error) {
}
var a asset
annotations := make(map[string]string, len(mfst.manifest.Annotations)+len(mfst.desc.Annotations))
for k, v := range mfst.desc.Annotations {
annotations[k] = v
}
for k, v := range mfst.manifest.Annotations {
annotations[k] = v
}
annotations := map[string]string{}
maps.Copy(annotations, mfst.desc.Annotations)
maps.Copy(annotations, mfst.manifest.Annotations)
if err := l.scanConfig(ctx, fetcher, mfst.manifest.Config, &a); err != nil {
return nil, err