// float 保留2位小数
func Decimal(value float64) float64 {
	value, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", value), 64)
	return value
}

//fload64 --> string 保留2位小数
func fs(flo float64) string { s := fmt.Sprintf("%.2f", flo) return s }

  

相关文章:

  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
  • 2022-02-24
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案