Check out example codes for "golang convert string to float". It will help you in understanding the concepts better.

Code Example 1

const bitSize = 64 // Don't think about it to much. It's just 64 bits.
floatNum, err := strconv.ParseFloat("123.45", bitSize)
fmt.Println(fmt.Sprintf("%f", floatNum))

Code Example 2

s := fmt.Sprintf("%f", 123.456) // s == "123.456000"

Learn ReactJs, React Native from akashmittal.com