Documentation
¶
Index ¶
- func FormatAddress(scheme, host string, port int) string
- func INIToJSON(contents []byte) ([]byte, error)
- func JSONToINI(contents []byte) ([]byte, error)
- func MarshalYAML(v any) ([]byte, error)
- func MergeYAML(base, override string) (string, error)
- func MustMarshalYAML(v any) []byte
- func MustNewFileFromFS(fs embed.FS, path string) []byte
- func MustUnmarshalYAML(data []byte, v any) error
- func NewIntPtr(i int) *int
- func UnmarshalYAML(data []byte, v any) error
- type Address
- type Format
- type Material
- func NewINIMaterial(contents []byte, path string) (Material, error)
- func NewJSONMaterial(contents []byte, path string) (Material, error)
- func NewMaterial(contents any, path string, format Format) (Material, error)
- func NewTextMaterial(contents []byte, path string) Material
- func NewYAMLMaterial(contents []byte, path string) (Material, error)
- func (m Material) Contents() []byte
- func (m Material) FmtContents() []byte
- func (m Material) GetBytes(path string) ([]byte, error)
- func (m Material) GetStringSlice(path string) ([]string, error)
- func (m Material) IsMultiDoc() bool
- func (m Material) Path() string
- func (m Material) ToYaml() ([]byte, error)
- func (m Material) WithContents(contents []byte) Material
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatAddress ¶
FormatAddress creates a formatted address string from scheme, host, and port.
func MarshalYAML ¶
func MergeYAML ¶ added in v0.0.2
MergeYAML takes a base YAML string and an override YAML string, and returns a new YAML string with deep merge — override keys win at every level, base-only keys are preserved.
func MustMarshalYAML ¶
func MustUnmarshalYAML ¶
func UnmarshalYAML ¶
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
func NewAddress ¶
NewAddress parses a URL-formatted address string into host and port components.
func NewAddresses ¶
NewAddresses parses multiple address strings and returns the parsed results.
type Material ¶
type Material struct {
// contains filtered or unexported fields
}
func NewJSONMaterial ¶ added in v0.0.6
func NewTextMaterial ¶
func (Material) FmtContents ¶
func (Material) IsMultiDoc ¶ added in v0.0.2
func (Material) WithContents ¶ added in v0.0.2
WithContents returns a new Material with the given contents, preserving the path and format.
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func MustNewTemplate ¶
func MustNewTemplateFromFS ¶
func NewTemplateFromFS ¶
Click to show internal directories.
Click to hide internal directories.