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 16, 2024
1 parent 9810806 commit ac1d330
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 @@ -533,7 +533,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 @@ -728,7 +728,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 @@ -795,7 +795,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 @@ -79,7 +79,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 ac1d330

Please sign in to comment.