sshd: Better comments and changed += 1 to ++

This commit is contained in:
UlisseMini 2019-01-25 12:25:05 -05:00 committed by Andrey Petrov
parent e6233daefd
commit 9c918676ed

View File

@ -55,7 +55,7 @@ func (c sshConn) Name() string {
return c.User() return c.User()
} }
// Extending ssh/terminal to include a closer interface // Terminal extends ssh/terminal to include a close method
type Terminal struct { type Terminal struct {
terminal.Terminal terminal.Terminal
Conn Connection Conn Connection
@ -106,7 +106,7 @@ func NewTerminal(conn *ssh.ServerConn, ch ssh.NewChannel) (*Terminal, error) {
return &term, nil return &term, nil
} }
// Find session channel and make a Terminal from it // NewSession Finds a session channel and make a Terminal from it
func NewSession(conn *ssh.ServerConn, channels <-chan ssh.NewChannel) (*Terminal, error) { func NewSession(conn *ssh.ServerConn, channels <-chan ssh.NewChannel) (*Terminal, error) {
// Make a terminal from the first session found // Make a terminal from the first session found
for ch := range channels { for ch := range channels {