Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
yalosev committed Oct 6, 2023
1 parent d9c9895 commit 7557ae3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion pkg/hook/binding_context/binding_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
)

func JqEqual(t *testing.T, input []byte, program string, expected string) {
//nolint:typecheck // Ignore false positive: undeclared name: `Jq`.
res, err := Jq().Program(program).Run(string(input))

Check failure on line 16 in pkg/hook/binding_context/binding_context_test.go

View workflow job for this annotation

GitHub Actions / Run linter

undefined: Jq (typecheck)
if assert.NoError(t, err) {
assert.Equal(t, expected, res, "jq: '%s', json was '%s'", program, string(input))
Expand Down
1 change: 0 additions & 1 deletion pkg/kube_events_manager/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ func (m *monitor) CreateInformersForNamespace(namespace string) (informers []*re
}

for _, objName := range objNames {

informer := newResourceInformer(namespace, objName, cfg)

err := informer.createSharedInformer()
Expand Down
4 changes: 2 additions & 2 deletions pkg/kube_events_manager/monitor_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (c *MonitorConfig) WithFieldSelector(fieldSel *FieldSelector) {
}
}

//func (c *MonitorConfig) AddFieldSelectorRequirement(field string, op string, value string) {
// func (c *MonitorConfig) AddFieldSelectorRequirement(field string, op string, value string) {
// if c.FieldSelector == nil {
// c.FieldSelector = &FieldSelector{
// MatchExpressions: []FieldSelectorRequirement{},
Expand Down Expand Up @@ -110,7 +110,7 @@ func (c *MonitorConfig) WithLabelSelector(labelSel *metav1.LabelSelector) {
}
}

//func (c *MonitorConfig) IsAnyNamespace() bool {
// func (c *MonitorConfig) IsAnyNamespace() bool {
// return c.NamespaceSelector == nil ||
// (c.NamespaceSelector.NameSelector == nil && c.NamespaceSelector.LabelSelector == nil) ||
// (c.NamespaceSelector.NameSelector != nil && len(c.NamespaceSelector.NameSelector.MatchNames) == 0)
Expand Down
1 change: 0 additions & 1 deletion pkg/kube_events_manager/namespace_informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func NewNamespaceInformer(ctx context.Context, client klient.Client, monitor *Mo

func (ni *namespaceInformer) withContext(ctx context.Context) {
ni.ctx, ni.cancel = context.WithCancel(ctx)

}

func (ni *namespaceInformer) createSharedInformer(addFn func(string), delFn func(string)) error {
Expand Down
2 changes: 0 additions & 2 deletions pkg/kube_events_manager/resource_informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ type resourceInformer struct {
}

// resourceInformer should implement ResourceInformer
//var _ ResourceInformer = &resourceInformer{}

type resourceInformerConfig struct {
client klient.Client
mstor *metric_storage.MetricStorage
Expand Down

0 comments on commit 7557ae3

Please sign in to comment.