ReadJson unmarshalls a json into this map
(list string)
| 87 | |
| 88 | // ReadJson unmarshalls a json into this map |
| 89 | func (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 | } |
no test coverage detected