MCPcopy
hub / github.com/coder/websocket / assertCloseStatus

Function assertCloseStatus

conn_test.go:486–494  ·  view source on GitHub ↗
(exp websocket.StatusCode, err error)

Source from the content-addressed store, hash-verified

484}
485
486func assertCloseStatus(exp websocket.StatusCode, err error) error {
487 if websocket.CloseStatus(err) == -1 {
488 return fmt.Errorf("expected websocket.CloseError: %T %v", err, err)
489 }
490 if websocket.CloseStatus(err) != exp {
491 return fmt.Errorf("expected close status %v but got %v", exp, err)
492 }
493 return nil
494}
495
496type connTest struct {
497 t testing.TB

Callers 3

goEchoLoopMethod · 0.70
goDiscardLoopMethod · 0.70
echoServerFunction · 0.70

Calls 1

CloseStatusFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…