MCPcopy
hub / github.com/github/git-sizer / ToUint64

Method ToUint64

counts/counts.go:72–74  ·  view source on GitHub ↗

ToUint64 returns the value of `n` as a `uint64`. If the value has overflowed, it returns `(math.MaxUint64, true)`.

()

Source from the content-addressed store, hash-verified

70// ToUint64 returns the value of `n` as a `uint64`. If the value has
71// overflowed, it returns `(math.MaxUint64, true)`.
72func (n Count64) ToUint64() (uint64, bool) {
73 return uint64(n), n == math.MaxUint64
74}
75
76// Plus returns the sum of two Count64s, capped at math.MaxUint64.
77func (n1 Count64) Plus(n2 Count64) Count64 {

Callers 1

TestCount64Function · 0.95

Calls

no outgoing calls

Tested by 1

TestCount64Function · 0.76