MCPcopy Index your code
hub / github.com/devspace-sh/devspace / websocketError

Function websocketError

pkg/devspace/server/command.go:12–15  ·  view source on GitHub ↗
(ws *websocket.Conn, err error)

Source from the content-addressed store, hash-verified

10)
11
12func websocketError(ws *websocket.Conn, err error) {
13 _ = ws.SetWriteDeadline(time.Now().Add(time.Second * 2))
14 _ = ws.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseInternalServerErr, err.Error()))
15}
16
17func (h *handler) command(w http.ResponseWriter, r *http.Request) {
18 name, ok := r.URL.Query()["name"]

Callers 3

logsMethod · 0.85
enterMethod · 0.85
commandMethod · 0.85

Calls 3

SetWriteDeadlineMethod · 0.80
AddMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected