Skip to content

Commit

Permalink
fixing linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
gizas committed Apr 24, 2024
1 parent 95f30aa commit ea50b00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libbeat/autodiscover/providers/docker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Config struct {
CleanupTimeout time.Duration `config:"cleanup_timeout" validate:"positive"`
}

// Public variable, so specific beats (as Filebeat) can set a different cleanup timeout if they need it.
// DefaultCleanupTimeout Public variable, so specific beats (as Filebeat) can set a different cleanup timeout if they need it.
var DefaultCleanupTimeout time.Duration = 0

func defaultConfig() *Config {
Expand Down
4 changes: 3 additions & 1 deletion libbeat/autodiscover/providers/kubernetes/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2196,8 +2196,10 @@ func TestPodEventer_Namespace_Node_Watcher(t *testing.T) {
}

for _, test := range tests {

t.Run(test.name, func(t *testing.T) {
config := conf.MustNewConfigFrom(&test.cfg)
testcfg := &test.cfg

Check failure on line 2201 in libbeat/autodiscover/providers/kubernetes/pod_test.go

View workflow job for this annotation

GitHub Actions / lint (linux)

G601: Implicit memory aliasing in for loop. (gosec)
config := conf.MustNewConfigFrom(testcfg)
c := defaultConfig()
err = config.Unpack(&c)
assert.NoError(t, err)
Expand Down

0 comments on commit ea50b00

Please sign in to comment.