(val interface{})
| 37 | } |
| 38 | |
| 39 | func FmtStringFromInterface(val interface{}) string { |
| 40 | if val == nil { |
| 41 | return "" |
| 42 | } |
| 43 | switch ret := val.(type) { |
| 44 | case string: |
| 45 | return ret |
| 46 | case int8, uint8, int16, uint16, int, uint, int64, uint64, float32, float64: |
| 47 | return fmt.Sprintf("%v", ret) |
| 48 | } |
| 49 | return "" |
| 50 | } |
| 51 | |
| 52 | func FmtFloatFromInterface(val interface{}) float64 { |
| 53 | if val == nil { |
nothing calls this directly
no outgoing calls
no test coverage detected