MCPcopy Create free account
hub / github.com/facebook/time / ChannelFromString

Function ChannelFromString

calnex/api/api.go:345–351  ·  view source on GitHub ↗

ChannelFromString returns channel from string

(value string)

Source from the content-addressed store, hash-verified

343
344// ChannelFromString returns channel from string
345func ChannelFromString(value string) (*Channel, error) {
346 c := Channel(strings.ToUpper(value))
347 if _, ok := channelCalnexToInt[c]; !ok {
348 return nil, ErrBadChannel
349 }
350 return &c, nil
351}
352
353// UnmarshalText channel from string version
354func (c *Channel) UnmarshalText(value []byte) error {

Callers 3

UnmarshalTextMethod · 0.85
SetMethod · 0.85
TestChannelFunction · 0.85

Calls 1

ChannelTypeAlias · 0.85

Tested by 1

TestChannelFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…