Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorbin committed Feb 1, 2025
1 parent 16197ab commit 4d9ffce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions daemon/root_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package daemon

import (
"fmt"
"testing"
"time"

Expand Down Expand Up @@ -34,7 +33,7 @@ func TestReload(t *testing.T) {
Port: 2002,
},
HTTPChecks: []healthcheck.HTTPHealthcheckConfiguration{
healthcheck.HTTPHealthcheckConfiguration{
{
Base: healthcheck.Base{
Name: "foo",
Description: "bar",
Expand All @@ -55,7 +54,7 @@ func TestReload(t *testing.T) {

size := len(component.Healthcheck.ListChecks())
if size != 1 {
t.Fatalf(fmt.Sprintf("The healthcheck was not added correctly: %d", size))
t.Fatalf("The healthcheck was not added correctly: %d", size)
}

err = component.Reload(&Configuration{
Expand All @@ -64,7 +63,7 @@ func TestReload(t *testing.T) {
Port: 2002,
},
HTTPChecks: []healthcheck.HTTPHealthcheckConfiguration{
healthcheck.HTTPHealthcheckConfiguration{
{
Base: healthcheck.Base{
Name: "foo",
Description: "bar",
Expand Down Expand Up @@ -154,7 +153,7 @@ func TestReload(t *testing.T) {
}
size = len(component.Healthcheck.ListChecks())
if size != 4 {
t.Fatalf(fmt.Sprintf("The healthcheck was not added correctly: %d", size))
t.Fatalf("The healthcheck was not added correctly: %d", size)
}
dnsCheck := healthcheck.NewDNSHealthcheck(zap.NewExample(),
&healthcheck.DNSHealthcheckConfiguration{
Expand Down
4 changes: 2 additions & 2 deletions discovery/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func New(logger *zap.Logger, config Configuration, promComponent *prometheus.Pro

// Start start all discovery mechanisms
func (c *Component) Start() error {
if c.HTTPDiscovery != nil && len(c.HTTPDiscovery) != 0 {
if c.HTTPDiscovery != nil && len(c.HTTPDiscovery) != 0 { // nolint
for i := range c.HTTPDiscovery {
discovery := c.HTTPDiscovery[i]
err := discovery.Start()
Expand All @@ -90,7 +90,7 @@ func (c *Component) Start() error {

// Stop stop all discovery mechanisms
func (c *Component) Stop() error {
if c.HTTPDiscovery != nil && len(c.HTTPDiscovery) != 0 {
if c.HTTPDiscovery != nil && len(c.HTTPDiscovery) != 0 { // nolint
for i := range c.HTTPDiscovery {
discovery := c.HTTPDiscovery[i]
err := discovery.Stop()
Expand Down
2 changes: 1 addition & 1 deletion healthcheck/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (h *CommandHealthcheck) Execute(ctx context.Context) error {
} else {
errorMsg = fmt.Sprintf("The command failed, stderr=%s", stdErr.String())
}
return errors.Wrapf(err, errorMsg)
return errors.Wrap(err, errorMsg)
}

return nil
Expand Down

0 comments on commit 4d9ffce

Please sign in to comment.