moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
8.09k stars 1.14k forks source link

refactor with slices and maps pkg #5030

Closed tonistiigi closed 3 months ago

tonistiigi commented 3 months ago

Rewrite some handwritten logic with recent helper function from go stdlib

tonistiigi commented 3 months ago

Removed commit with slices.Concat as it was added in go1.22

tonistiigi commented 3 months ago

I think it would also improve readability to replace usages of sort.Slices with slices.SortFunc, to avoid carrying the integer indexes.