diff --git a/pkg/util/protoutil/jsonpb_marshal.go b/pkg/util/protoutil/jsonpb_marshal.go index 5c9317720be1..aec642045a75 100644 --- a/pkg/util/protoutil/jsonpb_marshal.go +++ b/pkg/util/protoutil/jsonpb_marshal.go @@ -133,3 +133,8 @@ func (j *JSONPb) NewEncoder(w io.Writer) gwruntime.Encoder { return errors.Errorf("unexpected type %T does not implement %s", v, typeProtoMessage) }) } + +// Delimiter implements gwruntime.Delimited. +func (*JSONPb) Delimiter() []byte { + return []byte("\n") +} diff --git a/pkg/util/protoutil/marshaler.go b/pkg/util/protoutil/marshaler.go index 0f93fba8820f..29f349a9317b 100644 --- a/pkg/util/protoutil/marshaler.go +++ b/pkg/util/protoutil/marshaler.go @@ -101,3 +101,8 @@ func (e *protoEncoder) Encode(v interface{}) error { } return errors.Errorf("unexpected type %T does not implement %s", v, typeProtoMessage) } + +// Delimiter implements gwruntime.Delimited. +func (*ProtoPb) Delimiter() []byte { + return []byte("\n") +}