Documentation
¶
Index ¶
Constants ¶
View Source
const ( Unknown = module.SectionUnknown Type = module.SectionType Import = module.SectionImport Function = module.SectionFunction Table = module.SectionTable Memory = module.SectionMemory Global = module.SectionGlobal Export = module.SectionExport Start = module.SectionStart Element = module.SectionElement Code = module.SectionCode Data = module.SectionData )
Variables ¶
This section is empty.
Functions ¶
func CopyKnownSection ¶ added in v0.6.0
func CopyKnownSection(w io.Writer, r reader.R, id Id, unknownLoader func(r Reader, payloadLen uint32) error) (length int64, err error)
CopyKnownSection with the given type if one is found. The returned length includes the copied section's header and payload (everything that was written). Unknown sections preceding the known section are processed by unknownLoader (or discarded if it's nil) - they are not included in the returned length. If another known section type is found, it is left untouched (the reader will be backed up before the section id) and zero length is returned. If no known section is encountered, zero length and io.EOF are returned. io.EOF is returned only when it occurs between sections.
Types ¶
type NameSection ¶
type UnknownLoader ¶
type UnknownLoaders ¶
type UnknownLoaders map[string]UnknownLoader
Click to show internal directories.
Click to hide internal directories.