yaml

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler implements YAML format handling

func NewHandler

func NewHandler(opts *formats.Options) *Handler

NewHandler creates a new YAML handler

func (*Handler) Extensions

func (h *Handler) Extensions() []string

Extensions returns supported file extensions

func (*Handler) Format

func (h *Handler) Format() formats.Format

Format returns the format type

func (*Handler) Generate

func (h *Handler) Generate(w io.Writer, data map[string]string) error

Generate writes YAML format

func (*Handler) GenerateFile

func (h *Handler) GenerateFile(filename string, data map[string]string) error

GenerateFile writes YAML to file

func (*Handler) GenerateString

func (h *Handler) GenerateString(data map[string]string) (string, error)

GenerateString generates YAML string

func (*Handler) Parse

func (h *Handler) Parse(r io.Reader) (map[string]string, error)

Parse parses YAML content

func (*Handler) ParseFile

func (h *Handler) ParseFile(filename string) (map[string]string, error)

ParseFile parses YAML from file

func (*Handler) ParseString

func (h *Handler) ParseString(content string) (map[string]string, error)

ParseString parses YAML from string

func (*Handler) Validate

func (h *Handler) Validate(content []byte) error

Validate validates YAML content

func (*Handler) ValidateKey

func (h *Handler) ValidateKey(_ string) error

ValidateKey validates a YAML key

func (*Handler) ValidateValue

func (h *Handler) ValidateValue(_ string) error

ValidateValue validates a YAML value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL