Method
decodeBool
(v bool, rv reflect.Value)
Source from the content-addressed store, hash-verified
| 124 | } |
| 125 | |
| 126 | func (d *decoder) decodeBool(v bool, rv reflect.Value) error { |
| 127 | switch rv.Kind() { |
| 128 | case reflect.Bool, reflect.Interface: |
| 129 | rv.Set(reflect.ValueOf(v).Convert(rv.Type())) |
| 130 | default: |
| 131 | return &document.UnmarshalTypeError{Value: "bool", Type: rv.Type()} |
| 132 | } |
| 133 | return nil |
| 134 | } |
| 135 | |
| 136 | func (d *decoder) decodeFloat(v float64, rv reflect.Value) error { |
| 137 | switch rv.Kind() { |
Tested by
no test coverage detected