MCPcopy Create free account
hub / github.com/imroc/req / matchResult

Method matchResult

internal/bisect/bisect.go:365–373  ·  view source on GitHub ↗

matchResult returns the result from the first condition that matches id.

(id uint64)

Source from the content-addressed store, hash-verified

363
364// matchResult returns the result from the first condition that matches id.
365func (m *Matcher) matchResult(id uint64) bool {
366 for i := len(m.list) - 1; i >= 0; i-- {
367 c := &m.list[i]
368 if id&c.mask == c.bits {
369 return c.result
370 }
371 }
372 return false
373}
374
375// FileLine reports whether the change identified by file and line should be enabled.
376// If the change should be printed, FileLine prints a one-line report to w.

Callers 2

ShouldEnableMethod · 0.95
ShouldPrintMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected