MCPcopy Create free account
hub / github.com/chain/txvm / UnmarshalText

Method UnmarshalText

encoding/json/json.go:22–27  ·  view source on GitHub ↗

UnmarshalText satisfies the encoding.TextUnmarshaler interface

(text []byte)

Source from the content-addressed store, hash-verified

20
21// UnmarshalText satisfies the encoding.TextUnmarshaler interface
22func (h *HexBytes) UnmarshalText(text []byte) error {
23 n := hex.DecodedLen(len(text))
24 *h = make([]byte, n)
25 _, err := hex.Decode(*h, text)
26 return err
27}
28
29// Map is a byte slice that should parse as a string encoding a JSON
30// object. This is checked in UnmarshalJSON.

Callers

nothing calls this directly

Calls 1

DecodeMethod · 0.80

Tested by

no test coverage detected