Skip to content

Commit

Permalink
chore: cleanup a few lint problems
Browse files Browse the repository at this point in the history
Some small non-functional changes to avoid the IDE giving us false-positive problem warnings.
  • Loading branch information
justinsb committed Oct 21, 2024
1 parent e422d90 commit d5efbda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/direct/common/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func ComputeGCPLabels(labels map[string]string) map[string]string {
}

func RemoveByPrefixes(a map[string]string, prefixes ...string) {
for k, _ := range a {
for k := range a {
for i := range prefixes {
if strings.HasPrefix(k, prefixes[i]) {
delete(a, k)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/direct/monitoring/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type gcpClient struct {
config config.ControllerConfig
}

func newGCPClient(ctx context.Context, config *config.ControllerConfig) (*gcpClient, error) {
func newGCPClient(config *config.ControllerConfig) (*gcpClient, error) {
gcpClient := &gcpClient{
config: *config,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var _ directbase.Adapter = &dashboardAdapter{}

// AdapterForObject implements the Model interface.
func (m *dashboardModel) AdapterForObject(ctx context.Context, kube client.Reader, u *unstructured.Unstructured) (directbase.Adapter, error) {
gcpClient, err := newGCPClient(ctx, m.config)
gcpClient, err := newGCPClient(m.config)
if err != nil {
return nil, fmt.Errorf("building gcp client: %w", err)
}
Expand Down Expand Up @@ -122,7 +122,7 @@ func (m *dashboardModel) AdapterForURL(ctx context.Context, url string) (directb

tokens := strings.Split(strings.TrimPrefix(url, "//monitoring.googleapis.com/"), "/")
if len(tokens) == 4 && tokens[0] == "projects" && tokens[2] == "dashboards" {
gcpClient, err := newGCPClient(ctx, m.config)
gcpClient, err := newGCPClient(m.config)
if err != nil {
return nil, fmt.Errorf("building gcp client: %w", err)
}
Expand Down

0 comments on commit d5efbda

Please sign in to comment.