MCPcopy
hub / github.com/dgraph-io/dgraph / Diff

Function Diff

x/x.go:970–986  ·  view source on GitHub ↗

Diff computes the difference between the keys of the two given maps.

(dst map[string]struct{}, src map[string]struct{})

Source from the content-addressed store, hash-verified

968
969// Diff computes the difference between the keys of the two given maps.
970func Diff(dst map[string]struct{}, src map[string]struct{}) ([]string, []string) {
971 var add []string
972 var del []string
973
974 for g := range dst {
975 if _, ok := src[g]; !ok {
976 add = append(add, g)
977 }
978 }
979 for g := range src {
980 if _, ok := dst[g]; !ok {
981 del = append(del, g)
982 }
983 }
984
985 return add, del
986}
987
988// SpanTimer returns a function used to record the duration of the given span.
989// It supports both OpenCensus and OpenTelemetry spans

Callers 3

needsTokIndexRebuildMethod · 0.92
userModFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected