Skip to content

Commit 4d9ffce

Browse files
committed
Fix lint
1 parent 16197ab commit 4d9ffce

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

daemon/root_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package daemon
22

33
import (
4-
"fmt"
54
"testing"
65
"time"
76

@@ -34,7 +33,7 @@ func TestReload(t *testing.T) {
3433
Port: 2002,
3534
},
3635
HTTPChecks: []healthcheck.HTTPHealthcheckConfiguration{
37-
healthcheck.HTTPHealthcheckConfiguration{
36+
{
3837
Base: healthcheck.Base{
3938
Name: "foo",
4039
Description: "bar",
@@ -55,7 +54,7 @@ func TestReload(t *testing.T) {
5554

5655
size := len(component.Healthcheck.ListChecks())
5756
if size != 1 {
58-
t.Fatalf(fmt.Sprintf("The healthcheck was not added correctly: %d", size))
57+
t.Fatalf("The healthcheck was not added correctly: %d", size)
5958
}
6059

6160
err = component.Reload(&Configuration{
@@ -64,7 +63,7 @@ func TestReload(t *testing.T) {
6463
Port: 2002,
6564
},
6665
HTTPChecks: []healthcheck.HTTPHealthcheckConfiguration{
67-
healthcheck.HTTPHealthcheckConfiguration{
66+
{
6867
Base: healthcheck.Base{
6968
Name: "foo",
7069
Description: "bar",
@@ -154,7 +153,7 @@ func TestReload(t *testing.T) {
154153
}
155154
size = len(component.Healthcheck.ListChecks())
156155
if size != 4 {
157-
t.Fatalf(fmt.Sprintf("The healthcheck was not added correctly: %d", size))
156+
t.Fatalf("The healthcheck was not added correctly: %d", size)
158157
}
159158
dnsCheck := healthcheck.NewDNSHealthcheck(zap.NewExample(),
160159
&healthcheck.DNSHealthcheckConfiguration{

discovery/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func New(logger *zap.Logger, config Configuration, promComponent *prometheus.Pro
7676

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

9191
// Stop stop all discovery mechanisms
9292
func (c *Component) Stop() error {
93-
if c.HTTPDiscovery != nil && len(c.HTTPDiscovery) != 0 {
93+
if c.HTTPDiscovery != nil && len(c.HTTPDiscovery) != 0 { // nolint
9494
for i := range c.HTTPDiscovery {
9595
discovery := c.HTTPDiscovery[i]
9696
err := discovery.Stop()

healthcheck/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (h *CommandHealthcheck) Execute(ctx context.Context) error {
122122
} else {
123123
errorMsg = fmt.Sprintf("The command failed, stderr=%s", stdErr.String())
124124
}
125-
return errors.Wrapf(err, errorMsg)
125+
return errors.Wrap(err, errorMsg)
126126
}
127127

128128
return nil

0 commit comments

Comments
 (0)