The maximum value for an int type in Go

https://groups.google.com/group/golang-nuts/msg/71c307e4d73024ce?pli=1 The germane part: Since integer types use two’s complement arithmetic, you can infer the min/max constant values for int and uint. For example, const MaxUint = ^uint(0) const MinUint = 0 const MaxInt = int(MaxUint >> 1) const MinInt = -MaxInt – 1 As per @CarelZA’s comment: uint8 : 0 to 255 uint16 : … Read more