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 148 views
2 answers 163 views
1 answer 91 views
2 answers 151 views
1 answer 127 views
2 answers 241 views
1 answer 136 views
...