MCPcopy Index your code
hub / github.com/docker/cli / updateStringToSlice

Function updateStringToSlice

cli/command/service/update.go:546–552  ·  view source on GitHub ↗
(flags *pflag.FlagSet, flag string, field *[]string)

Source from the content-addressed store, hash-verified

544}
545
546func updateStringToSlice(flags *pflag.FlagSet, flag string, field *[]string) {
547 if !flags.Changed(flag) {
548 return
549 }
550
551 *field = flags.Lookup(flag).Value.(*ShlexOpt).Value()
552}
553
554func anyChanged(flags *pflag.FlagSet, fields ...string) bool {
555 return slices.ContainsFunc(fields, flags.Changed)

Callers 1

updateServiceFunction · 0.85

Calls 1

ValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…