Fix more gosec G104 warnings

I have a hard time running it locally, so testing in prod.
pull/1/head
Marc-Antoine Ruel 5 years ago
parent b8dde0ed43
commit 3e859ec96e

@ -372,9 +372,9 @@ func (d *Dev) Init() error {
// Reset can be also used to awaken the device // Reset can be also used to awaken the device
func (d *Dev) Reset() { func (d *Dev) Reset() {
d.rst.Out(gpio.Low) _ = d.rst.Out(gpio.Low)
time.Sleep(200 * time.Millisecond) time.Sleep(200 * time.Millisecond)
d.rst.Out(gpio.High) _ = d.rst.Out(gpio.High)
time.Sleep(200 * time.Millisecond) time.Sleep(200 * time.Millisecond)
} }

@ -107,7 +107,8 @@ func makeDev(ra registerAccess, variant Variant, devicename string) (*Dev, error
} }
pins[i] = ports[i].pins() pins[i] = ports[i].pins()
for _, pin := range pins[i] { for _, pin := range pins[i] {
gpioreg.Register(pin) // Ignore registration failure.
_ = gpioreg.Register(pin)
} }
} }
return &Dev{ return &Dev{

Loading…
Cancel
Save