精度计算 截取小数位数 // 截取小数位数 _ func floatRound(f float64, n int) (res float64) { format := "%." + strconv.Itoa(n) + "f" res, _ = strconv.ParseFloat(fmt.Sprintf(format, f), 64) return }