我想格式化float64值在golang 2位小数html/template中说index.html文件.在.go文件中,我可以格式化为:
float64
html/template
index.html
.go
strconv.FormatFloat(value, 'f', 2, 32)
但我不知道如何在模板中格式化它.我正在使用gin-gonic/gin框架进行后端.任何帮助将不胜感激.谢谢.
gin-gonic/gin
format go go-html-template
format ×1
go ×1
go-html-template ×1