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

Function removeItems

cli/command/service/update.go:913–925  ·  view source on GitHub ↗
(
	seq []string,
	toRemove map[string]struct{},
	keyFunc func(string) string,
)

Source from the content-addressed store, hash-verified

911}
912
913func removeItems(
914 seq []string,
915 toRemove map[string]struct{},
916 keyFunc func(string) string,
917) []string {
918 newSeq := []string{}
919 for _, item := range seq {
920 if _, exists := toRemove[keyFunc(item)]; !exists {
921 newSeq = append(newSeq, item)
922 }
923 }
924 return newSeq
925}
926
927func updateMounts(flags *pflag.FlagSet, mounts *[]mount.Mount) error {
928 mountsByTarget := map[string]mount.Mount{}

Callers 1

updateEnvironmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…