MCPcopy Index your code
hub / github.com/getlantern/sysproxy / allEquals

Function allEquals

sysproxy.go:150–162  ·  view source on GitHub ↗
(expected string, actual string)

Source from the content-addressed store, hash-verified

148}
149
150func allEquals(expected string, actual string) bool {
151 if (expected == "") != (strings.TrimSpace(actual) == "") { // XOR
152 return false
153 }
154 lines := strings.Split(actual, "\n")
155 for _, l := range lines {
156 trimmed := strings.TrimSpace(l)
157 if trimmed != "" && trimmed != expected {
158 return false
159 }
160 }
161 return true
162}

Callers 2

TestAllEqualsFunction · 0.85
verifyFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestAllEqualsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…