Skip to content

Commit

Permalink
fix var name
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis committed Dec 10, 2024
1 parent 81814d9 commit f022c26
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/srv/discovery/database_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (s *Server) startDatabaseWatchers() error {
PreFetchHookFn: func() {
discoveryConfigs := slices.FilterMapUnique(
s.getAllDatabaseFetchers(),
func(f common.Fetcher) (s string, skip bool) {
func(f common.Fetcher) (s string, include bool) {
return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != ""
},
)
Expand Down
6 changes: 3 additions & 3 deletions lib/srv/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func (s *Server) initAWSWatchers(matchers []types.AWSMatcher) error {
server.WithPreFetchHookFn(func() {
discoveryConfigs := libslices.FilterMapUnique(
s.getAllAWSServerFetchers(),
func(f server.Fetcher) (s string, skip bool) {
func(f server.Fetcher) (s string, include bool) {
return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != ""
},
)
Expand Down Expand Up @@ -727,7 +727,7 @@ func (s *Server) initAzureWatchers(ctx context.Context, matchers []types.AzureMa
server.WithPreFetchHookFn(func() {
discoveryConfigs := libslices.FilterMapUnique(
s.getAllAzureServerFetchers(),
func(f server.Fetcher) (s string, skip bool) {
func(f server.Fetcher) (s string, include bool) {
return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != ""
},
)
Expand Down Expand Up @@ -794,7 +794,7 @@ func (s *Server) initGCPServerWatcher(ctx context.Context, vmMatchers []types.GC
server.WithPreFetchHookFn(func() {
discoveryConfigs := libslices.FilterMapUnique(
s.getAllGCPServerFetchers(),
func(f server.Fetcher) (s string, skip bool) {
func(f server.Fetcher) (s string, include bool) {
return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != ""
},
)
Expand Down
2 changes: 1 addition & 1 deletion lib/srv/discovery/kube_integration_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (s *Server) startKubeIntegrationWatchers() error {
PreFetchHookFn: func() {
discoveryConfigs := libslices.FilterMapUnique(
s.getKubeIntegrationFetchers(),
func(f common.Fetcher) (s string, skip bool) {
func(f common.Fetcher) (s string, include bool) {
return f.GetDiscoveryConfigName(), f.GetDiscoveryConfigName() != ""
},
)
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/slices/slices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestFilterMapUnique(t *testing.T) {
expected: []string{"x", "y", "z"},
},
{
name: "includeped values are not returned",
name: "not included values are not returned",
input: []string{"x", "y", "z", ""},
collector: func(in string) (s string, include bool) {
return in, in != ""
Expand Down

0 comments on commit f022c26

Please sign in to comment.