From 70d96bd2c211a12d3b812a748ba379f001426dd1 Mon Sep 17 00:00:00 2001 From: "Sean E. Russell" Date: Thu, 10 Feb 2022 09:24:50 -0600 Subject: [PATCH] Temporarily replace David's goopt with my patched version that fixes the dash issue. --- devices/temp_freebsd.go | 6 +++--- go.mod | 2 ++ go.sum | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/devices/temp_freebsd.go b/devices/temp_freebsd.go index 593ae1e9..a2a07fa6 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 674f2f3f..96461917 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 912ffa93..c1fa322e 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=