.github: add a staticcheck action (#326)

Add a staticcheck step to the lint job of the Test workflow, and fix
reported diagnostics.
This commit is contained in:
Robert Findley 2025-08-19 14:58:01 -04:00 • committed by GitHub
commit 46ba813860
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -121,7 +121,7 @@ func (h *StreamableHTTPHandler) ServeHTTP(w http.ResponseWriter, req *http.Reque
var transport *StreamableServerTransport
if id := req.Header.Get(sessionIDHeader); id != "" {
h.mu.Lock()
transport, _ = h.transports[id]
transport = h.transports[id]
h.mu.Unlock()
if transport == nil {
http.Error(w, "session not found", http.StatusNotFound)
@ -288,9 +288,6 @@ type streamableServerConn struct {
jsonResponse bool
eventStore EventStore
lastStreamID atomic.Int64 // last stream ID used, atomically incremented
opts StreamableServerTransportOptions
incoming chan jsonrpc.Message // messages from the client to the server
done chan struct{}