Decode unmarshals the underlying value attached to the Boolean to a target variable. target should be one of these: - pointer to an empty interface - pointer to a boolean Example: value := NewBoolean(t, true) var target bool value.Decode(&target) assert.Equal(t, true, target)
(target interface{})
| 66 | // |
| 67 | // assert.Equal(t, true, target) |
| 68 | func (b *Boolean) Decode(target interface{}) *Boolean { |
| 69 | opChain := b.chain.enter("Decode()") |
| 70 | defer opChain.leave() |
| 71 | |
| 72 | if opChain.failed() { |
| 73 | return b |
| 74 | } |
| 75 | |
| 76 | canonDecode(opChain, b.value, target) |
| 77 | return b |
| 78 | } |
| 79 | |
| 80 | // Alias is similar to Value.Alias. |
| 81 | func (b *Boolean) Alias(name string) *Boolean { |