mirror of
https://gitea.com/Lydanne/buildx.git
synced 2026-01-15 18:34:13 +08:00
deps: update buildkit, vendor changes
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
9
vendor/github.com/docker/cli/opts/throttledevice.go
generated
vendored
9
vendor/github.com/docker/cli/opts/throttledevice.go
generated
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user