Linter fixes

This commit is contained in:
Jose Garcia 2021-09-23 13:14:35 -04:00
parent c4114cc972
commit b8f35f950c
3 changed files with 3 additions and 3 deletions

View file

@ -130,7 +130,7 @@ func (s *Session) openStreamingChannel(ctx context.Context, id channelID) (ssh.C
return nil, fmt.Errorf("error getting stream id: %w", err)
}
span, ctx := opentracing.StartSpanFromContext(ctx, "Session.OpenChannel+SendRequest")
span, _ := opentracing.StartSpanFromContext(ctx, "Session.OpenChannel+SendRequest")
defer span.Finish()
channel, reqs, err := s.ssh.conn.OpenChannel("session", nil)

View file

@ -94,7 +94,7 @@ func (fwd *PortForwarder) shareRemotePort(ctx context.Context) (channelID, error
if err != nil {
err = fmt.Errorf("failed to share remote port %d: %w", fwd.remotePort, err)
}
return id, nil
return id, err
}
func awaitError(ctx context.Context, errc <-chan error) error {

View file

@ -71,7 +71,7 @@ func TestServerStartSharing(t *testing.T) {
testServer, session, err := makeMockSession(
livesharetest.WithService("serverSharing.startSharing", startSharing),
)
defer testServer.Close()
defer testServer.Close() //nolint:stylecheck // httptest.Server does not return errors on Close()
if err != nil {
t.Errorf("error creating mock session: %w", err)