whatsthecodeforthat.com

What's the code for Parsing a Float in go?

import "strconv"

// For a 32-bit float
f, err := strconv.ParseFloat(str, 32)

// For a 64-bit float
f, err := strconv.ParseFloat(str, 64)