How to get the min and max integer in Go

1 Answer

0 votes
package main

import (
    "fmt"
    "math"
)

func main() {
    fmt.Println(math.MaxInt64)
    
    fmt.Println(math.MinInt64)
}


 
/*
run:

9223372036854775807
-9223372036854775808
 
*/

 



answered May 17, 2025 by avibootz

Related questions

3 answers 348 views
2 answers 340 views
1 answer 219 views
2 answers 318 views
1 answer 243 views
2 answers 374 views
1 answer 255 views
...