elvish/pkg/util/limits.go
2019-12-23 20:00:59 +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
)