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:
Clayton Craft
2022-05-30 23:23:43 -07:00
parent 3d02037e3a
commit cdf41938b0

View File

@@ -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