How do I use the fmt.Scanf
function in Go to get an integer input from the standard input?
If this can't be done using fmt.Scanf
, what's the best way to read a single integer?
gostdin
How do I use the fmt.Scanf
function in Go to get an integer input from the standard input?
If this can't be done using fmt.Scanf
, what's the best way to read a single integer?
Best Answer
http://golang.org/pkg/fmt/#Scanf
All the included libraries in Go are well documented.
That being said, I believe
does the trick