MCPcopy Create free account
hub / github.com/benbjohnson/immutable / Compare

Method Compare

immutable.go:2359–2359  ·  view source on GitHub ↗

Returns -1 if a is less than b, returns 1 if a is greater than b, and returns 0 if a is equal to b.

(a, b K)

Source from the content-addressed store, hash-verified

2357 // Returns -1 if a is less than b, returns 1 if a is greater than b,
2358 // and returns 0 if a is equal to b.
2359 Compare(a, b K) int
2360}
2361
2362// NewComparer returns the built-in comparer for a given key type.

Callers 6

testNewComparerFunction · 0.95
indexOfMethod · 0.65
getMethod · 0.65
setMethod · 0.65
deleteMethod · 0.65
CompareMethod · 0.65

Calls

no outgoing calls

Tested by 1

testNewComparerFunction · 0.76