Skip to content

Commit

Permalink
remove reundant err checking (Juniper#51)
Browse files Browse the repository at this point in the history
golint will not complain when there are reundannt err checking.  Remove
those from transport_ssh.go
  • Loading branch information
nemith authored Feb 18, 2018
1 parent 3d394c5 commit 97b43ac
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions netconf/transport_ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ func (t *TransportSSH) Close() error {
}

// Close the socket
if err := t.sshClient.Close(); err != nil {
return err
}

return nil
return t.sshClient.Close()
}

// Dial connects and establishes SSH sessions
Expand Down Expand Up @@ -95,12 +91,7 @@ func (t *TransportSSH) setupSession() error {
}

t.ReadWriteCloser = NewReadWriteCloser(reader, writer)

if err := t.sshSession.RequestSubsystem(sshNetconfSubsystem); err != nil {
return err
}

return nil
return t.sshSession.RequestSubsystem(sshNetconfSubsystem)
}

// NewSSHSession creates a new NETCONF session using an existing net.Conn.
Expand Down

0 comments on commit 97b43ac

Please sign in to comment.