Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalDocument ¶
func MarshalDocument(handle *DocumentHandle, v any) ([]byte, error)
MarshalDocument writes struct field values back into the CST-backed document and returns the serialized bytes, preserving comments and formatting.
Types ¶
type DocumentHandle ¶
type DocumentHandle struct {
// contains filtered or unexported fields
}
DocumentHandle holds the CST-backed document for round-trip editing.
func UnmarshalDocument ¶
func UnmarshalDocument(input []byte, v any) (*DocumentHandle, error)
UnmarshalDocument parses TOML input into a CST-backed document and populates the struct pointed to by v using its `toml` struct tags.
func UnmarshalReader ¶
func UnmarshalReader(r io.Reader, v any) (*DocumentHandle, error)
UnmarshalReader parses TOML from an io.Reader into a CST-backed document and populates the struct pointed to by v using its `toml` struct tags.
Click to show internal directories.
Click to hide internal directories.