MCPcopy Create free account
hub / github.com/WICG/webpackage / newResponsesSection

Function newResponsesSection

go/bundle/encoder.go:383–392  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

381}
382
383func newResponsesSection(n int) *responsesSection {
384 ret := &responsesSection{}
385
386 enc := cbor.NewEncoder(&ret.buf)
387 if err := enc.EncodeArrayHeader(n); err != nil {
388 panic(err)
389 }
390
391 return ret
392}
393
394func (rs *responsesSection) addResponse(r Response) (int, int, error) {
395 offset := rs.buf.Len()

Callers 1

WriteToMethod · 0.85

Calls 2

EncodeArrayHeaderMethod · 0.95
NewEncoderFunction · 0.92

Tested by

no test coverage detected