MCPcopy Create free account
hub / github.com/devfile/devworkspace-operator / Equal

Function Equal

internal/map/map.go:28–38  ·  view source on GitHub ↗

Equal compares string maps for equality, regardless of order. Note that it treats a nil map as equal to an empty (but not nil) map.

(a, b map[string]string)

Source from the content-addressed store, hash-verified

26// Equal compares string maps for equality, regardless of order. Note that it treats
27// a nil map as equal to an empty (but not nil) map.
28func Equal(a, b map[string]string) bool {
29 if len(a) != len(b) {
30 return false
31 }
32 for k, v := range a {
33 if bval, ok := b[k]; !ok || bval != v {
34 return false
35 }
36 }
37 return true
38}

Calls

no outgoing calls

Tested by 2