config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package config contains helpers for loading and dumping TOML config files

Index

Constants

This section is empty.

Variables

View Source
var (
	// Indent is the string used for indenting TOML files when encoding them
	Indent = `  `
)

Functions

func LoadFile

func LoadFile(filename string, v any) error

LoadFile loads a TOML file by name, expanding environment variables, filling gaps and validating its content.

func Prepare

func Prepare(v any) error

Prepare fills any gap in the object and validates its content.

func WriteTo

func WriteTo(v any, w io.Writer) (int64, error)

WriteTo writes out the object encoded as TOML.

Types

This section is empty.

Jump to

Keyboard shortcuts

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