Bool returns the underlying value as bool. If the value is not bool, false will always be returned. If you're looking for true/false-evaluation of the underlying value, have a look on the IsTrue()-function.
()
| 183 | // will always be returned. If you're looking for true/false-evaluation of the |
| 184 | // underlying value, have a look on the IsTrue()-function. |
| 185 | func (v *Value) Bool() bool { |
| 186 | switch v.getResolvedValue().Kind() { |
| 187 | case reflect.Bool: |
| 188 | return v.getResolvedValue().Bool() |
| 189 | default: |
| 190 | logf("Value.Bool() not available for type: %s\n", v.getResolvedValue().Kind().String()) |
| 191 | return false |
| 192 | } |
| 193 | } |
| 194 | |
| 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. |
no test coverage detected