Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
Fix all new linter issues that are raised by golanglint-ci 1.56
  • Loading branch information
ncthompson committed Feb 19, 2024
1 parent 86d865c commit fa6fc5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/mqttclient/mqtt.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func getOpts(config Config) *mqtt.ClientOptions {
opts.SetOnConnectHandler(func(mqtt.Client) {
log.Info("Client connected to broker")
})
opts.SetConnectionLostHandler(func(cli mqtt.Client, err error) {
opts.SetConnectionLostHandler(func(_ mqtt.Client, err error) {

Check warning on line 68 in plugins/mqttclient/mqtt.go

View check run for this annotation

Codecov / codecov/patch

plugins/mqttclient/mqtt.go#L68

Added line #L68 was not covered by tests
log.Errorf("Client connection to broker lost: %v", err)

})
Expand Down
4 changes: 2 additions & 2 deletions plugins/munin/munin.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func NewMunin(mk2 mk2driver.Mk2) *Munin {
return m
}

func (m *Munin) ServeMuninHTTP(rw http.ResponseWriter, r *http.Request) {
func (m *Munin) ServeMuninHTTP(rw http.ResponseWriter, _ *http.Request) {
muninDat := <-m.muninResponse
if muninDat.timesUpdated == 0 {
log.Error("No data returned")
Expand Down Expand Up @@ -103,7 +103,7 @@ func (m *Munin) ServeMuninHTTP(rw http.ResponseWriter, r *http.Request) {
}
}

func (m *Munin) ServeMuninConfigHTTP(rw http.ResponseWriter, r *http.Request) {
func (m *Munin) ServeMuninConfigHTTP(rw http.ResponseWriter, _ *http.Request) {

Check warning on line 106 in plugins/munin/munin.go

View check run for this annotation

Codecov / codecov/patch

plugins/munin/munin.go#L106

Added line #L106 was not covered by tests
output := muninConfig
_, err := rw.Write([]byte(output))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion plugins/munin/munin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/diebietse/invertergui/mk2driver"
)

func TestServer(t *testing.T) {
func TestServer(_ *testing.T) {

mockMk2 := mk2driver.NewMk2Mock()
muninServer := NewMunin(mockMk2)
Expand Down

0 comments on commit fa6fc5f

Please sign in to comment.