Float returns an float64 representation.
()
| 175 | |
| 176 | // Float returns an float64 representation. |
| 177 | func (t Result) Float() float64 { |
| 178 | switch t.Type { |
| 179 | default: |
| 180 | return 0 |
| 181 | case True: |
| 182 | return 1 |
| 183 | case String: |
| 184 | n, _ := strconv.ParseFloat(t.Str, 64) |
| 185 | return n |
| 186 | case Number: |
| 187 | return t.Num |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | // Time returns a time.Time representation. |
| 192 | func (t Result) Time() time.Time { |
no outgoing calls