Golang strconv.ParseFloat() function example
package strconv
Golang strconv.ParseFloat() function usage example
package main
import (
"fmt"
"strconv"
)
func main() {
s := "123.010"
f, err := strconv.ParseFloat(s, 10)
if err != nil {
fmt.Println(err)
}
fmt.Println(f)
}
Reference :
Advertisement
Something interesting
Tutorials
+21.2k Golang : For loop continue,break and range
+21.8k Golang : GORM create record or insert new record into database example
+12k Golang : Convert(cast) bigint to string
+46.6k Golang : Encode image to base64 example
+22.1k Fix "Failed to start php5-fpm.service: Unit php5-fpm.service is masked."
+6.6k Golang : Map within a map example
+6.6k Golang : Combine slices of complex numbers and operation example
+16k Golang : Read a file line by line
+6.9k Golang : Experimental emojis or emoticons icons programming language
+11.3k CodeIgniter : How to check if a session exist in PHP?
+21.5k Golang : How to force compile or remove object files first before rebuild?
+8.8k Golang : Combine slices but preserve order example