summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2022-02-10 09:24:50 -0600
committerSean E. Russell <ser@ser1.net>2022-02-10 09:24:50 -0600
commit70d96bd2c211a12d3b812a748ba379f001426dd1 (patch)
tree95c3cadd56a88784a9b22eb8f71ffc952b7ded7e
parent7d2656726e181968a8003607e1f0ab002706e443 (diff)
Temporarily replace David's goopt with my patched version that fixes the dash issue.
-rw-r--r--devices/temp_freebsd.go6
-rw-r--r--go.mod2
-rw-r--r--go.sum2
3 files changed, 7 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
diff --git a/go.mod b/go.mod
index 674f2f3..9646191 100644
--- a/go.mod
+++ b/go.mod
@@ -23,4 +23,6 @@ require (
howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5 // indirect
)
+replace github.com/droundy/goopt => github.com/xxxserxxx/goopt v0.0.0-20220210150945-f4719cb0883e
+
go 1.16
diff --git a/go.sum b/go.sum
index 912ffa9..c1fa322 100644
--- a/go.sum
+++ b/go.sum
@@ -71,6 +71,8 @@ github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2Obdk
github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=
github.com/valyala/histogram v1.0.1 h1:FzA7n2Tz/wKRMejgu3PV1vw3htAklTjjuoI6z3d4KDg=
github.com/valyala/histogram v1.0.1/go.mod h1:lQy0xA4wUz2+IUnf97SivorsJIp8FxsnRd6x25q7Mto=
+github.com/xxxserxxx/goopt v0.0.0-20220210150945-f4719cb0883e h1:5XgTxe0E4PhZ+FWvF7H4DIFWDdBl1k3FHstL7waF8sQ=
+github.com/xxxserxxx/goopt v0.0.0-20220210150945-f4719cb0883e/go.mod h1:ybXiXYU9w9/2lKDgxw4of1CqWxG34LUUjK50g+xocKA=
github.com/xxxserxxx/lingo/v2 v2.0.1 h1:6uLLKzPqL0XpdFmNMmpSfu+uIzQk344ebfdpFWbGuxs=
github.com/xxxserxxx/lingo/v2 v2.0.1/go.mod h1:Hr6LTxpwirwJ2Qe83MvgSQARPFDzZ4S6DKd6ciuED7A=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=