elvish/util/limits.go
2017-12-19 01:37:52 +00:00

13 lines
271 B
Go

package util
// Limit values for uint and int.
//
// NOTE: The math package contains similar constants for explicitly sized
// integer types, but lack those for uint and int.
const (
MaxUint = ^uint(0)
MinUint = 0
MaxInt = int(MaxUint >> 1)
MinInt = -MaxInt - 1
)