]> Cypherpunks repositories - gostls13.git/commitdiff
exp/ssh: rename (some) fields
authorChristopher Wedgwood <cw@f00f.org>
Mon, 16 Jan 2012 15:09:36 +0000 (10:09 -0500)
committerAdam Langley <agl@golang.org>
Mon, 16 Jan 2012 15:09:36 +0000 (10:09 -0500)
R=dave, agl, agl
CC=golang-dev
https://golang.org/cl/5494057

src/pkg/exp/ssh/client.go
src/pkg/exp/ssh/session.go

index 8df81457bf54269bf13b522f1bd85c9de02c5d83..eb6c0352210fa7b00b30fde74f4da951923f338b 100644 (file)
@@ -306,9 +306,8 @@ type clientChan struct {
        stdout      *chanReader      // receives the payload of channelData messages
        stderr      *chanReader      // receives the payload of channelExtendedData messages
        msg         chan interface{} // incoming messages
-
-       theyClosed bool // indicates the close msg has been received from the remote side
-       weClosed   bool // incidates the close msg has been sent from our side
+       theyClosed  bool             // indicates the close msg has been received from the remote side
+       weClosed    bool             // incidates the close msg has been sent from our side
 }
 
 // newClientChan returns a partially constructed *clientChan
index 807dd8740d780eb42bc1eb0190564d089edb4662..ea4addbd50b074abda90bf3fbb25ebf7fb3d45b5 100644 (file)
@@ -70,7 +70,7 @@ type Session struct {
 
        started   bool // true once Start, Run or Shell is invoked.
        copyFuncs []func() error
-       errch     chan error // one send per copyFunc
+       errors    chan error // one send per copyFunc
 
        // true if pipe method is active
        stdinpipe, stdoutpipe, stderrpipe bool
@@ -244,10 +244,10 @@ func (s *Session) start() error {
                setupFd(s)
        }
 
-       s.errch = make(chan error, len(s.copyFuncs))
+       s.errors = make(chan error, len(s.copyFuncs))
        for _, fn := range s.copyFuncs {
                go func(fn func() error) {
-                       s.errch <- fn()
+                       s.errors <- fn()
                }(fn)
        }
        return nil
@@ -270,7 +270,7 @@ func (s *Session) Wait() error {
 
        var copyError error
        for _ = range s.copyFuncs {
-               if err := <-s.errch; err != nil && copyError == nil {
+               if err := <-s.errors; err != nil && copyError == nil {
                        copyError = err
                }
        }