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

Function assertCloseStatus

internal/thirdparty/gin_test.go:67–75  ·  view source on GitHub ↗
(exp websocket.StatusCode, err error)

Source from the content-addressed store, hash-verified

65}
66
67func assertCloseStatus(exp websocket.StatusCode, err error) error {
68 if websocket.CloseStatus(err) == -1 {
69 return fmt.Errorf("expected websocket.CloseError: %T %v", err, err)
70 }
71 if websocket.CloseStatus(err) != exp {
72 return fmt.Errorf("expected close status %v but got %v", exp, err)
73 }
74 return nil
75}

Callers 1

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…