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

Function newPrimarySection

go/bundle/encoder.go:429–436  ·  view source on GitHub ↗
(url *url.URL)

Source from the content-addressed store, hash-verified

427func (ps *primarySection) Name() string { return "primary" }
428
429func newPrimarySection(url *url.URL) (*primarySection, error) {
430 var ps primarySection
431 enc := cbor.NewEncoder(&ps)
432 if err := enc.EncodeTextString(url.String()); err != nil {
433 return nil, err
434 }
435 return &ps, nil
436}
437
438type manifestSection struct {
439 bytes.Buffer

Callers 1

WriteToMethod · 0.85

Calls 3

EncodeTextStringMethod · 0.95
NewEncoderFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected