MCPcopy
hub / github.com/google/go-cmp / BoolResult

Function BoolResult

cmp/internal/diff/diff.go:100–106  ·  view source on GitHub ↗

BoolResult returns a Result that is either Equal or not Equal.

(b bool)

Source from the content-addressed store, hash-verified

98
99// BoolResult returns a Result that is either Equal or not Equal.
100func BoolResult(b bool) Result {
101 if b {
102 return Result{NumSame: 1} // Equal, Similar
103 } else {
104 return Result{NumDiff: 2} // Not Equal, not Similar
105 }
106}
107
108// Equal indicates whether the symbols are equal. Two symbols are equal
109// if and only if NumDiff == 0. If Equal, then they are also Similar.

Callers 2

FormatDiffSliceMethod · 0.92
formatDiffSliceMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected