From 936350b7b47100940863a6bc6d911b2a6cca5e56 Mon Sep 17 00:00:00 2001 From: Vaibhav Kamra Date: Fri, 3 Jun 2022 14:45:48 -0700 Subject: [PATCH] Embed io.Reader in DataStream (#127) This allows callers to use DataStream as an io.Reader without the need to call ToReader() --- src/internal/connector/exchange_data_collection.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/internal/connector/exchange_data_collection.go b/src/internal/connector/exchange_data_collection.go index b27d78bde..dc2934b22 100644 --- a/src/internal/connector/exchange_data_collection.go +++ b/src/internal/connector/exchange_data_collection.go @@ -11,10 +11,9 @@ type DataCollection interface { } // DataStream represents a single item within a DataCollection -// that can be consumed as a stream +// that can be consumed as a stream (it embeds io.Reader) type DataStream interface { - // ToReader returns a reader for the data stream - ToReader() io.Reader + io.Reader // Provides a unique identifier for this data UUID() string }