| 123456789101112131415161718 |
- package formatutil
- import (
- "math"
- "strings"
- )
- func Float64ToResponse(f float64) *float64 {
- if math.IsNaN(f) || math.IsInf(f, 0) {
- return nil
- }
- return &f
- }
- func StripWhitespace(s string) string {
- return strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(s, " ", ""), "\t", ""), "\n", "")
- }
|