Skip to content

Instantly share code, notes, and snippets.

@ericychoi
Created July 13, 2016 21:57
Show Gist options
  • Save ericychoi/784f6c9d17f4ddab5c9ec0bd6c9850eb to your computer and use it in GitHub Desktop.
Save ericychoi/784f6c9d17f4ddab5c9ec0bd6c9850eb to your computer and use it in GitHub Desktop.
Go: Max Numbers
package main
import "fmt"
const MaxUint = ^uint(0)
const MinUint = 0
const MaxInt = int(MaxUint >> 1)
const MinInt = -MaxInt - 1
func main() {
fmt.Printf("MaxUint: %d\n", MaxUint)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment