Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidManifest = errors.New("not a valid typst manifest")
Functions ¶
func ConfigurableWriteTOML ¶
func ConfigurableWriteTOML(w io.Writer, p PackageInfo, data []byte, unmarshal UnmarshalFunc) error
Write the Packageinfo (name, version and entrypoint) to io.Writer
The Unmarshal Function can be configured (e.g. for testing Purposes)
func DefaultUnmarshaler ¶
The Default Unmarshal function.
Types ¶
type Manifest ¶
type Manifest struct {
Package PackageInfo `toml:"package"`
}
type PackageInfo ¶
type PackageInfo struct {
// The Name of the Package
Name string `toml:"name"`
// The Version of the Package
Version string `toml:"version"`
// The Entrypoint of the Package
Entrypoint string `toml:"entrypoint"`
}
Structure with the required Typst TOML fields
func ConfigureableUnmarshal ¶
func ConfigureableUnmarshal(data []byte, unmarshal UnmarshalFunc) (PackageInfo, error)
Unmarshal a byte slice into a PackageInfo Struct
The Unmarshal Function can be configured (e.g. for testing Purposes)
func TypstTOMLUnmarshal ¶
func TypstTOMLUnmarshal(data []byte) (PackageInfo, error)
Unmarshal a byte slice into a PackageInfo Struct
func (*PackageInfo) ValidateVersion ¶
func (p *PackageInfo) ValidateVersion() bool
type UnmarshalFunc ¶
Click to show internal directories.
Click to hide internal directories.