File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
1919type FilterFn func (obj * unstructured.Unstructured ) (result interface {}, err error )
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments