config

package
v0.0.0-...-f1d9af4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: AGPL-3.0, Apache-2.0, CC-BY-SA-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(cfg interface{}) ([]byte, error)

Dump returns a YAML representation of cfg.

func DumpAndExit

func DumpAndExit(cfg interface{}) error

DumpAndExit writes the given config to stdout as YAML. If an error occurs, that error is returned. Otherwise, the program exits 0.

Example:

log.Fatal(DumpAndExit(cfg))

func LoadFile

func LoadFile(cfg interface{}, configPath string) error

LoadFile loads configuration from the file given by configPath and decodes it into cfg.

YAML and JSON formats are supported.

Types

This section is empty.

Jump to

Keyboard shortcuts

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