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

@ -1,6 +1,10 @@
package pb
import "github.com/moby/buildkit/client"
import (
"maps"
"github.com/moby/buildkit/client"
)
func CreateCaches(entries []*CacheOptionsEntry) []client.CacheOptionsEntry {
var outs []client.CacheOptionsEntry
@ -12,9 +16,7 @@ func CreateCaches(entries []*CacheOptionsEntry) []client.CacheOptionsEntry {
Type: entry.Type,
Attrs: map[string]string{},
}
for k, v := range entry.Attrs {
out.Attrs[k] = v
}
maps.Copy(out.Attrs, entry.Attrs)
outs = append(outs, out)
}
return outs

View File

@ -2,6 +2,7 @@ package pb
import (
"io"
"maps"
"os"
"strconv"
@ -26,9 +27,7 @@ func CreateExports(entries []*ExportEntry) ([]client.ExportEntry, []string, erro
Type: entry.Type,
Attrs: map[string]string{},
}
for k, v := range entry.Attrs {
out.Attrs[k] = v
}
maps.Copy(out.Attrs, entry.Attrs)
supportFile := false
supportDir := false