Skip to content

Instantly share code, notes, and snippets.

View petergloor's full-sized avatar
🙂
playing Github ;)

Peter Gloor petergloor

🙂
playing Github ;)
View GitHub Profile
@petergloor
petergloor / main.go
Created January 25, 2017 13:00
MaxInt, MinInt, MaxUint and MinUint in Go (golang)
package main
import "fmt"
// Constant definitions
const MaxUint = ^uint(0)
const MinUint = 0
const MaxInt = int(^uint(0) >> 1)
const MinInt = -MaxInt - 1