conf

package
v1.21.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package conf loads the YAML configuration file into a struct, first filling each field that has a `default` tag with that value, so a key the file leaves out keeps its documented default.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(file string, v any) error

Load fills v, a pointer to a struct, with the defaults of its `default` tags and then with the YAML file. A default that does not fit its field is an error, like an unreadable or malformed file.

func MustLoad

func MustLoad(file string, v any)

MustLoad is Load for start-up: the process cannot run without its configuration, so a failure ends it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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