yaml

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package yaml provides the YAML configuration decoder for CONGA applications.

Register Decode with conga.App.RegisterDecoder to enable YAML configuration support:

app.RegisterDecoder(".yaml", yaml.Decode)
app.RegisterDecoder(".yml", yaml.Decode)

Key Mapping

Top-level YAML keys match flag names using kebab-case, snake_case, or camelCase:

# config.yaml
http-port: 8080
database_url: "postgres://localhost/db"
maxRetries: 5

Parse failures wrap ErrParse, and an empty document decodes to an empty map.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrParse indicates a syntax or parsing error in YAML configuration.
	ErrParse = errors.New("yaml parse error")
)

Functions

func Decode

func Decode(data []byte) (map[string]any, error)

Decode decodes YAML bytes into the generic map[string]any structure the configuration engine matches against flag bindings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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