What is the most elegant way to return float64 after rounding 2 decimal places in the go language float 64?

what is the most elegant way to return float64 after rounding 2 decimal places in the go language float64?

May.07,2022

math.Round(a*100)/100

elegant or not elegant I don't know, the code should be correct


approximate value

// var n float64
n2, err := strconv.ParseFloat(fmt.Sprintf("%.2f", n), 64)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40ce6-ea92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40ce6-ea92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?