Convert string to integer type in Go? May 11, 2022 by IT Nursery I’m trying to convert a string returned from flag.Arg(n) to an int. What is the idiomatic way to do this in Go? 5 Answers 5