deviceinfo: Don't use deprecated strings.Title (MR 20)
This is a janky way to capitalize the first letter of the word. strings.Title was kind of overkill anyways I guess, since the reason for its deprecation wasn't even anything we'd hit in our usage of it (unable to detect some unicode punctuation for word boundaries... which a deviceinfo field wouldn't have anyways...) fixes #12
This commit is contained in:
@@ -120,7 +120,10 @@ func nameToField(name string) string {
|
|||||||
if p == "deviceinfo" {
|
if p == "deviceinfo" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
field = field + strings.Title(p)
|
if len(p) < 1 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
field = field + strings.ToUpper(p[:1]) + p[1:]
|
||||||
}
|
}
|
||||||
|
|
||||||
return field
|
return field
|
||||||
|
Reference in New Issue
Block a user