MCPcopy Index your code
hub / github.com/gobwas/ws / MustCompileFrame

Function MustCompileFrame

frame.go:396–402  ·  view source on GitHub ↗

MustCompileFrame is like CompileFrame but panics if frame can not be encoded.

(f Frame)

Source from the content-addressed store, hash-verified

394// MustCompileFrame is like CompileFrame but panics if frame can not be
395// encoded.
396func MustCompileFrame(f Frame) []byte {
397 bts, err := CompileFrame(f)
398 if err != nil {
399 panic(err)
400 }
401 return bts
402}
403
404func makeCloseFrame(code StatusCode) Frame {
405 return NewCloseFrame(NewCloseFrameBody(code, ""))

Callers 5

autobahn.goFile · 0.92
TestWriterFunction · 0.92
TestControlHandlerFunction · 0.92
BenchmarkReadHeaderFunction · 0.85
frame.goFile · 0.85

Calls 1

CompileFrameFunction · 0.85

Tested by 3

TestWriterFunction · 0.74
TestControlHandlerFunction · 0.74
BenchmarkReadHeaderFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…