Fix keyVal parse

This commit is contained in:
timoxa0 2024-06-12 10:23:08 +05:00
parent b062257995
commit 157162bea3

View file

@ -87,5 +87,8 @@ func parseDeviceAttributes(fields []string) map[string]string {
// Parses a key:val pair and returns key, val.
func parseKeyVal(pair string) (string, string) {
split := strings.Split(pair, ":")
if len(split) == 1 {
return split[0], ""
}
return split[0], split[1]
}