MCPcopy
hub / github.com/segmentio/ksuid / UnmarshalText

Method UnmarshalText

ksuid.go:119–126  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

117}
118
119func (i *KSUID) UnmarshalText(b []byte) error {
120 id, err := Parse(string(b))
121 if err != nil {
122 return err
123 }
124 *i = id
125 return nil
126}
127
128func (i *KSUID) UnmarshalBinary(b []byte) error {
129 id, err := FromBytes(b)

Callers 3

TestMarshalTextFunction · 0.95
SetMethod · 0.95
scanMethod · 0.95

Calls 1

ParseFunction · 0.85

Tested by 1

TestMarshalTextFunction · 0.76