deps: update buildkit, vendor changes

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2024-01-04 16:18:55 -06:00
parent 671347dc35
commit ba43fe08f4
482 changed files with 1848 additions and 1950 deletions

View File

@@ -62,9 +62,8 @@ type ThrottledeviceOpt struct {
// NewThrottledeviceOpt creates a new ThrottledeviceOpt
func NewThrottledeviceOpt(validator ValidatorThrottleFctType) ThrottledeviceOpt {
values := []*blkiodev.ThrottleDevice{}
return ThrottledeviceOpt{
values: values,
values: []*blkiodev.ThrottleDevice{},
validator: validator,
}
}
@@ -85,7 +84,7 @@ func (opt *ThrottledeviceOpt) Set(val string) error {
// String returns ThrottledeviceOpt values as a string.
func (opt *ThrottledeviceOpt) String() string {
var out []string
out := make([]string, 0, len(opt.values))
for _, v := range opt.values {
out = append(out, v.String())
}
@@ -95,7 +94,9 @@ func (opt *ThrottledeviceOpt) String() string {
// GetList returns a slice of pointers to ThrottleDevices.
func (opt *ThrottledeviceOpt) GetList() []*blkiodev.ThrottleDevice {
return append([]*blkiodev.ThrottleDevice{}, opt.values...)
out := make([]*blkiodev.ThrottleDevice, 0, len(opt.values))
copy(out, opt.values)
return out
}
// Type returns the option type