diff --git a/go.mod b/go.mod index 5c6ccfd1a..7c48ea919 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/Masterminds/sprig/v3 v3.2.3 github.com/NYTimes/gziphandler v1.1.1 github.com/bufbuild/buf v1.29.0 - github.com/conduitio/conduit-commons v0.0.0-20240228183204-44c456787a25 + github.com/conduitio/conduit-commons v0.0.0-20240228185905-49ce3f31fbcd github.com/conduitio/conduit-connector-file v0.6.0 github.com/conduitio/conduit-connector-generator v0.5.0 github.com/conduitio/conduit-connector-kafka v0.7.1 diff --git a/go.sum b/go.sum index cb26914fb..64306ea9d 100644 --- a/go.sum +++ b/go.sum @@ -1077,8 +1077,8 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/colinmarc/hdfs/v2 v2.1.1/go.mod h1:M3x+k8UKKmxtFu++uAZ0OtDU8jR3jnaZIAc6yK4Ue0c= -github.com/conduitio/conduit-commons v0.0.0-20240228183204-44c456787a25 h1:AEifS3EV44zg7w3D4ynf9y1iDJTHASTnQdmrpfgb4Co= -github.com/conduitio/conduit-commons v0.0.0-20240228183204-44c456787a25/go.mod h1:Hhr5nik71/Wz3yrLjaKSZ2HRQp1wNSOPY2JGGKz7fsw= +github.com/conduitio/conduit-commons v0.0.0-20240228185905-49ce3f31fbcd h1:BuKtwSyIMzhGWkU7diay5vimV4qJfKQZxMhwNjPaygc= +github.com/conduitio/conduit-commons v0.0.0-20240228185905-49ce3f31fbcd/go.mod h1:Hhr5nik71/Wz3yrLjaKSZ2HRQp1wNSOPY2JGGKz7fsw= github.com/conduitio/conduit-connector-file v0.6.0 h1:8tsGeGhKvFwYQZztOOL5/tmOhVShsfo9lQ3b/0fX8kQ= github.com/conduitio/conduit-connector-file v0.6.0/go.mod h1:ju7PiB4kTJgqng4KVXDt/Gvw/53kFwSzi5Ez9EDXxNI= github.com/conduitio/conduit-connector-generator v0.5.0 h1:zpXHif89DCJ13nftKLv31uI2AJGicpY5H1V7SwldRNo= diff --git a/pkg/plugin/processor/builtin/examples_exporter_test.go b/pkg/plugin/processor/builtin/examples_exporter_test.go index 9307e6957..8afe61a1d 100644 --- a/pkg/plugin/processor/builtin/examples_exporter_test.go +++ b/pkg/plugin/processor/builtin/examples_exporter_test.go @@ -17,6 +17,7 @@ package builtin import ( + "context" "io" "log" "os" @@ -24,6 +25,7 @@ import ( "strings" "testing" + "github.com/conduitio/conduit-commons/opencdc" "github.com/goccy/go-json" ) @@ -48,12 +50,11 @@ func TestMain(m *testing.M) { func exportProcessors(output io.Writer) { sorted := sortProcessors(processors) - bytes, err := json.MarshalIndent(sorted, "", " ") - if err != nil { - log.Fatalf("failed to marshal processors to JSON: %v", err) - } + ctx := opencdc.WithJSONMarshalOptions(context.Background(), &opencdc.JSONMarshalOptions{RawDataAsString: true}) + enc := json.NewEncoder(output) + enc.SetIndent("", " ") - _, err = output.Write(bytes) + err := enc.EncodeContext(ctx, sorted) if err != nil { log.Fatalf("failed to write processors to output: %v", err) } diff --git a/pkg/plugin/processor/builtin/processors.json b/pkg/plugin/processor/builtin/processors.json index 0637a088a..fe51488c7 100644 --- a/pkg/plugin/processor/builtin/processors.json +++ b/pkg/plugin/processor/builtin/processors.json @@ -1 +1 @@ -[] \ No newline at end of file +[]