Versions in this module Expand all Collapse all v0 v0.1.0 Nov 25, 2026 Changes in this version + const LibraryName + const LibraryURL + const LibraryVersion + const SpecVersion + func IsMarkdown(name string) bool + func ValidatePath(name string) error + type Archive struct + func New() *Archive + func Open(path string) (*Archive, error) + func OpenBytes(data []byte) (*Archive, error) + func (a *Archive) Bytes() ([]byte, error) + func (a *Archive) EditManifest() *Manifest + func (a *Archive) Entries() []Entry + func (a *Archive) EntryPoint() (string, error) + func (a *Archive) Has(path string) bool + func (a *Archive) Manifest() *Manifest + func (a *Archive) Mode() Mode + func (a *Archive) ReadFile(path string) ([]byte, error) + func (a *Archive) ReadText(path string) (string, error) + func (a *Archive) Remove(path string) error + func (a *Archive) Resolve(from, dest string) (Link, error) + func (a *Archive) Save(path string) error + func (a *Archive) SetEntryPoint(path string) error + func (a *Archive) Warnings() []Finding + func (a *Archive) WriteFile(name string, data []byte) error + func (a *Archive) WriteTo(w io.Writer) (int64, error) + type Code string + const ErrDuplicatePath + const ErrEntryPointChanged + const ErrEntryPointInvalid + const ErrEntryPointMissing + const ErrEntryPointUnresolved + const ErrIO + const ErrLimitExceeded + const ErrManifestInvalid + const ErrModeUnsupported + const ErrNotFound + const ErrPathConflict + const ErrPathControlChar + const ErrPathEmpty + const ErrPathInvalid + const ErrPathLeadingSlash + const ErrPathReservedChar + const ErrPathTraversal + const ErrTextInvalid + const ErrVersionUnsupported + const ErrZipEncrypted + const ErrZipInvalid + const WarnCaseCollision + const WarnCoverMissing + const WarnDuplicateMember + const WarnFieldIgnored + const WarnSpecialEntry + const WarnVersionOlder + func CodeOf(err error) Code + func (c Code) Error() string + type Entry struct + Kind EntryKind + Modified time.Time + Name string + Size uint64 + type EntryKind int + const KindDir + const KindFile + const KindSpecial + type Error struct + Code Code + Detail Code + Err error + Message string + Path string + func (e *Error) Error() string + func (e *Error) Is(target error) bool + func (e *Error) Unwrap() error + type Finding struct + Code Code + Detail Code + Message string + Path string + Severity Severity + type Limits struct + MaxEntries int + MaxEntryBytes uint64 + MaxManifestBytes uint64 + MaxRatio uint64 + MaxTotalBytes uint64 + RatioAppliesAbove uint64 + func DefaultLimits() Limits + type Link struct + Entry string + Fragment string + Kind LinkKind + Reason Reason + type LinkKind int + const LinkInternal + const LinkURL + const LinkUnresolved + type Manifest struct + func ParseManifest(data []byte) (*Manifest, error) + func (m *Manifest) Cover() string + func (m *Manifest) Delete(name string) + func (m *Manifest) Description() string + func (m *Manifest) EntryPoint() string + func (m *Manifest) Language() string + func (m *Manifest) Lookup(pointer string) (any, bool) + func (m *Manifest) MarshalJSON() ([]byte, error) + func (m *Manifest) Mode() Mode + func (m *Manifest) Set(name string, value any) error + func (m *Manifest) SetApplication(name, version, url string) + func (m *Manifest) SetMode(mode Mode) error + func (m *Manifest) SetTitle(title string) + func (m *Manifest) SpecVersion() string + func (m *Manifest) Title() string + func (m *Manifest) Warnings() []Finding + type Mode string + const ModeDocument + const ModeProject + type Reason string + const ReasonInvalid + const ReasonNotFound + const ReasonOutside + type Report struct + Findings []Finding + func Validate(data []byte) *Report + func ValidateFile(path string) (*Report, error) + func (r *Report) Errors() []Finding + func (r *Report) Valid() bool + func (r *Report) Warnings() []Finding + type Severity int + const SeverityError + const SeverityWarning + func (s Severity) String() string