MCPcopy Create free account
hub / github.com/cli/cli / onlyIn

Function onlyIn

script/ghmock/trim.go:192–205  ·  view source on GitHub ↗

onlyIn lists the fields in a that b doesn't ask for. A new object is listed once, without the fields inside it.

(a, b map[string]bool)

Source from the content-addressed store, hash-verified

190// onlyIn lists the fields in a that b doesn't ask for. A new object is listed
191// once, without the fields inside it.
192func onlyIn(a, b map[string]bool) []string {
193 var paths []string
194 for path := range a {
195 if b[path] {
196 continue
197 }
198 parent := path[:strings.LastIndex(path, ".")]
199 if parent == "data" || b[parent] {
200 paths = append(paths, path)
201 }
202 }
203 sort.Strings(paths)
204 return paths
205}

Callers 1

printDifferencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected