package main import ( \"fmt\" \"strconv\" ) func main() { k := 10/3.0 i := fmt.Sprintf(\"%.2f\", k) f,_ := strconv.ParseFloat(i, 2) fmt.Pri
You don't need any extra code ... its as simple as
import ( "fmt" ) func main() { k := 10 / 3.0 fmt.Printf("%.2f", k) }
Test Code