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

Function FindSection

go/bundle/decoder.go:31–40  ·  view source on GitHub ↗
(sos []sectionOffset, name string)

Source from the content-addressed store, hash-verified

29}
30
31func FindSection(sos []sectionOffset, name string) (sectionOffset, uint64, bool) {
32 offset := uint64(0)
33 for _, e := range sos {
34 if name == e.Name {
35 return e, offset, true
36 }
37 offset += e.Length
38 }
39 return sectionOffset{}, 0, false
40}
41
42type meta struct {
43 version version.Version

Callers 3

decodeSectionLengthsCBORFunction · 0.85
parseIndexSectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected