MCPcopy
hub / github.com/github/gh-ost / ReadCommaDelimitedList

Method ReadCommaDelimitedList

go/mysql/instance_key_map.go:89–102  ·  view source on GitHub ↗

ReadJson unmarshalls a json into this map

(list string)

Source from the content-addressed store, hash-verified

87
88// ReadJson unmarshalls a json into this map
89func (ikm *InstanceKeyMap) ReadCommaDelimitedList(list string) error {
90 if list == "" {
91 return nil
92 }
93 tokens := strings.Split(list, ",")
94 for _, token := range tokens {
95 key, err := ParseInstanceKey(token)
96 if err != nil {
97 return err
98 }
99 ikm.AddKey(*key)
100 }
101 return nil
102}

Callers 1

Calls 2

AddKeyMethod · 0.95
ParseInstanceKeyFunction · 0.85

Tested by

no test coverage detected