Fix keyVal parse
This commit is contained in:
parent
b062257995
commit
157162bea3
|
@ -87,5 +87,8 @@ func parseDeviceAttributes(fields []string) map[string]string {
|
||||||
// Parses a key:val pair and returns key, val.
|
// Parses a key:val pair and returns key, val.
|
||||||
func parseKeyVal(pair string) (string, string) {
|
func parseKeyVal(pair string) (string, string) {
|
||||||
split := strings.Split(pair, ":")
|
split := strings.Split(pair, ":")
|
||||||
|
if len(split) == 1 {
|
||||||
|
return split[0], ""
|
||||||
|
}
|
||||||
return split[0], split[1]
|
return split[0], split[1]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue