File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -39,19 +39,19 @@ const (
39
39
const (
40
40
intSize = 32 << (^ uint (0 ) >> 63 ) // 32 or 64
41
41
42
- MaxInt = 1 << (intSize - 1 ) - 1
43
- MinInt = - 1 << (intSize - 1 )
44
- MaxInt8 = 1 << 7 - 1
45
- MinInt8 = - 1 << 7
46
- MaxInt16 = 1 << 15 - 1
47
- MinInt16 = - 1 << 15
48
- MaxInt32 = 1 << 31 - 1
49
- MinInt32 = - 1 << 31
50
- MaxInt64 = 1 << 63 - 1
51
- MinInt64 = - 1 << 63
52
- MaxUint = 1 << intSize - 1
53
- MaxUint8 = 1 << 8 - 1
54
- MaxUint16 = 1 << 16 - 1
55
- MaxUint32 = 1 << 32 - 1
56
- MaxUint64 = 1 << 64 - 1
42
+ MaxInt = 1 << (intSize - 1 ) - 1 // MaxInt32 or MaxInt64 depending on intSize.
43
+ MinInt = - 1 << (intSize - 1 ) // MinInt32 or MinInt64 depending on intSize.
44
+ MaxInt8 = 1 << 7 - 1 // 127
45
+ MinInt8 = - 1 << 7 // -128
46
+ MaxInt16 = 1 << 15 - 1 // 32767
47
+ MinInt16 = - 1 << 15 // -32768
48
+ MaxInt32 = 1 << 31 - 1 // 2147483647
49
+ MinInt32 = - 1 << 31 // -2147483648
50
+ MaxInt64 = 1 << 63 - 1 // 9223372036854775807
51
+ MinInt64 = - 1 << 63 // -9223372036854775808
52
+ MaxUint = 1 << intSize - 1 // MaxUint32 or MaxUint64 depending on intSize.
53
+ MaxUint8 = 1 << 8 - 1 // 255
54
+ MaxUint16 = 1 << 16 - 1 // 65535
55
+ MaxUint32 = 1 << 32 - 1 // 4294967295
56
+ MaxUint64 = 1 << 64 - 1 // 18446744073709551615
57
57
)
You can’t perform that action at this time.
0 commit comments