Skip to content

Commit d9b973a

Browse files
committed
Fixed go-docs
1 parent 2c378bb commit d9b973a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arduino/utils/stream.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ import (
2222
)
2323

2424
// FeedStreamTo creates a pipe to pass data to the writer function.
25-
// FeedStreamTo returns the io.Writer side of the pipe, on which the user can write data
25+
// FeedStreamTo returns the io.WriteCloser side of the pipe, on which the user can write data.
26+
// The user must call Close() on the returned io.WriteCloser to release all the resources.
27+
// If needed, the context can be used to detect when all the data has been processed after
28+
// closing the writer.
2629
func FeedStreamTo(writer func(data []byte)) (io.WriteCloser, context.Context) {
2730
ctx, cancel := context.WithCancel(context.Background())
2831
r, w := io.Pipe()

0 commit comments

Comments
 (0)