Skip to content

Commit

Permalink
Fix comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
林志宇 committed Jul 3, 2019
1 parent 3b79fd2 commit ddd2593
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/transport/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (tls *inMemoryTransportLogStore) Entry(id uuid.UUID) (*LogEntry, error) {
entry, ok := tls.entries[id]
tls.mu.Unlock()
if !ok {
return entry, errors.New("not found")
return entry, errors.New("transport log entry not found")
}

return entry, nil
Expand Down
6 changes: 3 additions & 3 deletions pkg/transport/managed_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func newManagedTransport(tr Transport, entry Entry, accepted bool) *ManagedTrans
}
}

// Read reads using underlying
// Read reads using underlying transport.
func (tr *ManagedTransport) Read(p []byte) (n int, err error) {
tr.mu.RLock()
n, err = tr.Transport.Read(p)
Expand All @@ -51,7 +51,7 @@ func (tr *ManagedTransport) Read(p []byte) (n int, err error) {
return
}

// Write writes to an underlying
// Write writes to an underlying transport.
func (tr *ManagedTransport) Write(p []byte) (n int, err error) {
tr.mu.RLock()
n, err = tr.Transport.Write(p)
Expand Down Expand Up @@ -81,7 +81,7 @@ func (tr *ManagedTransport) killUpdate() {
tr.mu.Unlock()
}

// Close closes underlying
// Close closes underlying transport and kills worker.
func (tr *ManagedTransport) Close() error {
if tr == nil {
return nil
Expand Down

0 comments on commit ddd2593

Please sign in to comment.