Skip to content

Commit

Permalink
fix typo in Factory method using optional instead of option
Browse files Browse the repository at this point in the history
  • Loading branch information
NouemanKHAL committed Jan 3, 2025
1 parent c6b6b31 commit 16a8f3f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ require (
)

require (
github.com/DataDog/datadog-agent/pkg/util/optional v0.59.0
github.com/shirou/gopsutil/v4 v4.24.11
go.opentelemetry.io/collector/component/componenttest v0.115.0
)
Expand Down
2 changes: 0 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/collector/corechecks/net/wlan/wlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/DataDog/datadog-agent/pkg/collector/check"
core "github.com/DataDog/datadog-agent/pkg/collector/corechecks"
"github.com/DataDog/datadog-agent/pkg/util/log"
"github.com/DataDog/datadog-agent/pkg/util/optional"
"github.com/DataDog/datadog-agent/pkg/util/option"
)

const (
Expand Down Expand Up @@ -110,8 +110,8 @@ func (c *WLANCheck) Run() error {
}

// Factory creates a new check factory
func Factory() optional.Option[func() check.Check] {
return optional.NewOption(newCheck)
func Factory() option.Option[func() check.Check] {
return option.New(newCheck)
}

func newCheck() check.Check {
Expand Down

0 comments on commit 16a8f3f

Please sign in to comment.