MCPcopy Create free account
hub / github.com/gavv/httpexpect / Decode

Method Decode

boolean.go:68–78  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

66//
67// assert.Equal(t, true, target)
68func (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.
81func (b *Boolean) Alias(name string) *Boolean {

Callers 1

TestBoolean_DecodeFunction · 0.95

Calls 4

canonDecodeFunction · 0.85
enterMethod · 0.80
leaveMethod · 0.80
failedMethod · 0.80

Tested by 1

TestBoolean_DecodeFunction · 0.76