yaml

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option[T any] = util.Option[Renderer[T]]

Option is a functional option for configuring a Renderer.

func WithWriter

func WithWriter[T any](w io.Writer) Option[T]

WithWriter sets the output writer for the YAML renderer.

type Renderer

type Renderer[T any] struct {
	// contains filtered or unexported fields
}

Renderer provides a generic interface for rendering values as YAML.

func NewRenderer

func NewRenderer[T any](opts ...Option[T]) *Renderer[T]

NewRenderer creates a new YAML renderer with the given options.

func (*Renderer[T]) Render

func (r *Renderer[T]) Render(value T) error

Render marshals the value to YAML and writes it to the configured writer.

Jump to

Keyboard shortcuts

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