Skip to content

Commit

Permalink
Fix problems pointed out by the govet linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Oct 7, 2021
1 parent 110725a commit 626d24f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion swift.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ func (c *Connection) doTimeoutRequest(timer *time.Timer, req *http.Request) (*ht
cancelRequest(c.Transport, req)
return nil, TimeoutError
}
panic("unreachable") // For Go 1.0
}

// Set defaults for any unset values
Expand Down
4 changes: 2 additions & 2 deletions swift_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,10 @@ func TestAuthenticateRace(t *testing.T) {
defer wg.Done()
err := c.Authenticate(ctx)
if err != nil {
t.Fatal("Auth failed", err)
t.Error("Auth failed", err)
}
if !c.Authenticated() {
t.Fatal("Not authenticated")
t.Error("Not authenticated")
}
}()
}
Expand Down
1 change: 0 additions & 1 deletion swifttest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,6 @@ func (s *SwiftServer) serveHTTP(w http.ResponseWriter, req *http.Request) {
if !ok {
s.RUnlock()
panic(notAuthorized())
return
}

a.user = s.Accounts[session.username]
Expand Down
1 change: 0 additions & 1 deletion timeout_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func (t *timeoutReader) Read(p []byte) (int, error) {
t.cancel()
return 0, TimeoutError
}
panic("unreachable") // for Go 1.0
}

// Close the channel
Expand Down

0 comments on commit 626d24f

Please sign in to comment.