tomlutil

package
v1.60.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package tomlutil provides shared helpers for minimal TOML parsing used by the local and radio providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSections

func ParseSections(data []byte, section string, emit func(fields map[string]string))

ParseSections parses a minimal TOML document made up of repeated [[<section>]] blocks of `key = "value"` lines. For each section header it calls emit once with the accumulated fields, with values unquoted via Unquote. Blank lines, comments (#), and lines outside any section are ignored. An empty section still triggers emit, so callers apply their own validation. When a key repeats within a section, the last value wins.

func Unquote

func Unquote(s string) string

Unquote strips surrounding double quotes from a TOML string value, handling escape sequences (written by Go's %q format verb).

Types

This section is empty.

Jump to

Keyboard shortcuts

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