diff options
author | Sean E. Russell <ser@ser1.net> | 2022-02-10 09:24:50 -0600 |
---|---|---|
committer | Sean E. Russell <ser@ser1.net> | 2022-02-10 09:24:50 -0600 |
commit | 70d96bd2c211a12d3b812a748ba379f001426dd1 (patch) | |
tree | 95c3cadd56a88784a9b22eb8f71ffc952b7ded7e /devices | |
parent | 7d2656726e181968a8003607e1f0ab002706e443 (diff) |
Temporarily replace David's goopt with my patched version that fixes the dash issue.
Diffstat (limited to 'devices')
-rw-r--r-- | devices/temp_freebsd.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/devices/temp_freebsd.go b/devices/temp_freebsd.go index 593ae1e..a2a07fa 100644 --- a/devices/temp_freebsd.go +++ b/devices/temp_freebsd.go @@ -1,3 +1,4 @@ +//go:build freebsd // +build freebsd package devices @@ -38,9 +39,8 @@ func update(temps map[string]int) map[string]error { continue } - s1 := strings.Replace(string(output), "C", "", 1) - s2 := strings.TrimSuffix(s1, "\n") - convertedOutput := utils.ConvertLocalizedString(s2) + s1 := strings.TrimSuffix(strings.Replace(string(output), "C", "", 1), "\n") + convertedOutput := utils.ConvertLocalizedString(s1) value, err := strconv.ParseFloat(convertedOutput, 64) if err != nil { errors[v] = err |