Skip to content

Commit dad42a6

Browse files
committed
chore: fix lint issues
Signed-off-by: Timur Tuktamyshev <timur.tuktamyshev@flant.com>
1 parent 7aabe0b commit dad42a6

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

pkg/filter/filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import (
99
"runtime"
1010
"runtime/trace"
1111

12+
"github.com/itchyny/gojq"
1213
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
1314

1415
kemtypes "github.com/flant/shell-operator/pkg/kube_events_manager/types"
1516
utils_checksum "github.com/flant/shell-operator/pkg/utils/checksum"
16-
"github.com/itchyny/gojq"
1717
)
1818

1919
type FilterFn func(obj *unstructured.Unstructured) (result interface{}, err error)

pkg/filter/filter_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestRun(t *testing.T) {
4848
obj := newTestObject(map[string]interface{}{"foo": "bar"})
4949
expectedErr := errors.New("filter failed")
5050

51-
filterFn := func(o *unstructured.Unstructured) (interface{}, error) {
51+
filterFn := func(_ *unstructured.Unstructured) (interface{}, error) {
5252
return nil, expectedErr
5353
}
5454

@@ -63,7 +63,7 @@ func TestRun(t *testing.T) {
6363
obj := newTestObject(map[string]interface{}{"foo": "bar"})
6464

6565
// Return something that can't be marshaled to JSON
66-
filterFn := func(o *unstructured.Unstructured) (interface{}, error) {
66+
filterFn := func(_ *unstructured.Unstructured) (interface{}, error) {
6767
return make(chan int), nil // channels can't be marshaled
6868
}
6969

pkg/kube/object_patch/operation.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import (
66

77
"github.com/deckhouse/deckhouse/pkg/log"
88
sdkpkg "github.com/deckhouse/module-sdk/pkg"
9-
"github.com/flant/shell-operator/pkg/filter"
109
"github.com/hashicorp/go-multierror"
1110
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1211
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
1312
"k8s.io/apimachinery/pkg/types"
13+
14+
"github.com/flant/shell-operator/pkg/filter"
1415
)
1516

1617
// OperationSpec a JSON and YAML representation of the operation for shell hooks

0 commit comments

Comments
 (0)