From 85ad361ff3fff57730b7ba188bfd739d412eeaad Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 30 Aug 2022 18:46:35 +0200 Subject: [PATCH] chore: simplify --- util/modbus/functions.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/modbus/functions.go b/util/modbus/functions.go index cb0cdf8cf..6374ee0f9 100644 --- a/util/modbus/functions.go +++ b/util/modbus/functions.go @@ -11,10 +11,8 @@ import ( // ReadingName formats MBMD reading names func ReadingName(val string) string { - if len(val) > 0 { - val = strings.ToUpper(val[:1]) + val[1:] - } - return val + //lint:ignore SA1019 as Title is safe on ascii + return strings.Title(val) } func RTUFloat64ToFloat64(b []byte) float64 {