toml

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package toml provides the TOML configuration decoder for CONGA applications.

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

app.RegisterDecoder(".toml", toml.Decode)

Key Mapping

A top-level TOML key matches a flag's config tag as written or, when it has no tag, the flag name spelled in the app's key casing (conga.ConfigKeyCase, kebab-case by default). Other spellings and letter cases are unknown fields:

# config.toml
http-port = 8080
database-url = "postgres://localhost/db"
max-retries = 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 TOML configuration.
	ErrParse = errors.New("toml parse error")
)

Functions

func Decode

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

Decode decodes TOML 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