Help us shape the future of Go! Take the 2026 Go Developer Survey

yaml

package
v0.21.168 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package yaml encoder/decoder

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentStyle

type CommentStyle int
const (
	NoComment CommentStyle = iota
	HeadComment
	LineComment
	FootComment
)

type Encoder

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

func NewEncoder

func NewEncoder(req any) *Encoder

func (*Encoder) GetFormatInstructions

func (e *Encoder) GetFormatInstructions() string

func (*Encoder) Marshal

func (e *Encoder) Marshal(v any) ([]byte, error)

func (*Encoder) Unmarshal

func (e *Encoder) Unmarshal(bs []byte, ret any) error

func (*Encoder) Validate

func (e *Encoder) Validate(req any) error

func (*Encoder) WithCommentStyle

func (e *Encoder) WithCommentStyle(style CommentStyle) *Encoder

Jump to

Keyboard shortcuts

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