FormatFloat64 float64保留places位小数
(f float64, places int)
| 62 | |
| 63 | // FormatFloat64 float64保留places位小数 |
| 64 | func FormatFloat64(f float64, places int) float64 { |
| 65 | formatStr := "%." + strconv.Itoa(places) + "f" |
| 66 | f64, _ := strconv.ParseFloat(fmt.Sprintf(formatStr, f), 64) |
| 67 | return f64 |
| 68 | } |
| 69 | |
| 70 | func formatFilter(wheres []monitor.MonWhereItem) string { |
| 71 | filter := `` |
no outgoing calls
no test coverage detected