1 Commits
Author SHA1 Message Date
sneak 24487ce36a Export the loaded manifest type as Manifest (closes #236)
check / check (push) Canceled after 0s
Package mfer handed out a loaded manifest as the unexported type
manifest, so a program using the library could not name it, keep it in
a struct field or pass it to its own functions. As sneak approved, it is
now exported as Manifest with its fields kept private, so its existing
methods (Files, Signer, CreatedAt, String) are its whole API.

NewManifestFromReader and NewManifestFromFile return *Manifest, and the
lint suppressions for returning an unexported type are gone. The type's
doc comment no longer points at the settled design question, and String
has a doc comment. A new test in package mfer_test uses *mfer.Manifest
from outside the package.

Model: opus-5-5
2026-10-21 10:16:30 +00:00
+2 -2
View File
@@ -16,8 +16,8 @@ var (
)
// Manifest is a manifest loaded by NewManifestFromFile or
// NewManifestFromReader. Its fields are private; only its methods are the
// library's API.
// NewManifestFromReader, or made by Builder to write a new manifest file.
// Its fields are private; only its methods are the library's API.
type Manifest struct {
pbInner *MFFile
pbOuter *MFFileOuter