Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func From ¶
From constructs an Archive with the contents of fsys and an empty Comment. Subsequent changes to fsys are not reflected in the returned archive.
The transformation is lossy. For example, because directories are implicit in txtar archives, empty directories in fsys will be lost, and txtar does not represent file mode, mtime, or other file metadata. From does not guarantee that a.File[i].Data contains no file marker lines. See also warnings on Format. In short, it is unwise to use txtar as a generic filesystem serialization mechanism.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func New ¶
New starts a registry instance that serves modules found inside the _registry path inside fsys. It serves the OCI registry protocol. If prefix is non-empty, all module paths will be prefixed by that, separated by a slash (/).
Each module should be inside a directory named path_vers, where slashes in path have been replaced with underscores and should contain a cue.mod/module.cue file holding the module info.
The Registry should be closed after use.