Time returns the underlying value as time.Time. If the underlying value is not a time.Time, it returns the zero value of time.Time.
()
| 195 | // Time returns the underlying value as time.Time. |
| 196 | // If the underlying value is not a time.Time, it returns the zero value of time.Time. |
| 197 | func (v *Value) Time() time.Time { |
| 198 | tm, ok := v.Interface().(time.Time) |
| 199 | if ok { |
| 200 | return tm |
| 201 | } |
| 202 | return time.Time{} |
| 203 | } |
| 204 | |
| 205 | // IsTrue tries to evaluate the underlying value the Pythonic-way: |
| 206 | // |
no test coverage detected