From 13c6bd531ba20cb4a1afd31627b7f3b490f42ab8 Mon Sep 17 00:00:00 2001 From: Saxon1 Date: Mon, 4 Dec 2017 12:57:35 +1030 Subject: [PATCH] Improved function description --- ringbuffer/RingBuffer.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ringbuffer/RingBuffer.go b/ringbuffer/RingBuffer.go index cb152112..2372131c 100644 --- a/ringbuffer/RingBuffer.go +++ b/ringbuffer/RingBuffer.go @@ -120,11 +120,11 @@ func (rb *ringBuffer) DoneWriting(size int) error { } /* -Read gets the address of the next element that we would like to get data -from and thereafter consider empty in the buffer for writing during latter -calls to Get. The address of the data is returned, as well as the size of -the data contained at this address. An error is returned if the buffer is -empty, or there has been a second call to Read before a call to DoneReading. +Read returns a slice containing the next element in the ring buffer and +thereafter considers it empty and can be used for latter writing. The address +of the data is returned, as well as the size of the data contained at this +address. An error is returned if the buffer is empty, or there has been a +second call to Read before a call to DoneReading. */ func (rb *ringBuffer) Read() ([]byte, error) { rb.mutex.Lock()