Exercises & activities from the go workshop provided by Packt: https://courses.packtpub.com/courses/go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
284 B

  1. package main
  2. import (
  3. "fmt"
  4. "math"
  5. "math/big"
  6. )
  7. func main() {
  8. intA := math.MaxInt64
  9. intA++
  10. bigA := big.NewInt(math.MaxInt64)
  11. bigA.Add(bigA, big.NewInt(1))
  12. fmt.Println("MaxInt64:", math.MaxInt64)
  13. fmt.Println("Int: ", intA)
  14. fmt.Println("Big Int: ", bigA)
  15. }