Fix a bunch of misspellings in our Go code (all in comments).
[arvados.git] / sdk / go / streamer / transfer.go
index a4a194f69bcc8fbdbf43650caa881325bde5dc24..499b4d966810223d7e1747caff4a1ce39113b470 100644 (file)
@@ -16,13 +16,13 @@ channel back to the transfer() function.
 Meanwhile, the transfer() function selects() on two channels, the "requests"
 channel and the "slices" channel.
 
 Meanwhile, the transfer() function selects() on two channels, the "requests"
 channel and the "slices" channel.
 
-When a message is recieved on the "slices" channel, this means the a new
+When a message is received on the "slices" channel, this means the a new
 section of the buffer has data, or an error is signaled.  Since the data has
 been read directly into the source_buffer, it is able to simply increases the
 size of the body slice to encompass the newly filled in section.  Then any
 pending reads are serviced with handleReadRequest (described below).
 
 section of the buffer has data, or an error is signaled.  Since the data has
 been read directly into the source_buffer, it is able to simply increases the
 size of the body slice to encompass the newly filled in section.  Then any
 pending reads are serviced with handleReadRequest (described below).
 
-When a message is recieved on the "requests" channel, it means a StreamReader
+When a message is received on the "requests" channel, it means a StreamReader
 wants access to a slice of the buffer.  This is passed to handleReadRequest().
 
 The handleReadRequest() function takes a sliceRequest consisting of a buffer
 wants access to a slice of the buffer.  This is passed to handleReadRequest().
 
 The handleReadRequest() function takes a sliceRequest consisting of a buffer
@@ -249,9 +249,7 @@ func (this *AsyncStream) transfer(source_reader io.Reader) {
                                        }
                                }
                        } else {
                                        }
                                }
                        } else {
-                               if reader_status == io.EOF {
-                                       // no more reads expected, so this is ok
-                               } else {
+                               if reader_status == nil {
                                        // slices channel closed without signaling EOF
                                        reader_status = io.ErrUnexpectedEOF
                                }
                                        // slices channel closed without signaling EOF
                                        reader_status = io.ErrUnexpectedEOF
                                }