taurus

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 8 Imported by: 0

README

Taurus

Taurus is a simple configuration library for Go. It was originally developed as part of LibraCore to replace Viper.

The Viper configuration library is great, but it didn't quite fit Libra's needs. Taurus is meant to provide the main features of Viper without all of its complexity.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindEnvAlias

func BindEnvAlias(fieldPath string, aliases ...string)

func BindFlag

func BindFlag(fieldPath string, flag *pflag.Flag)

func Load

func Load(configData string, cfg interface{}) error

func LoadEnv

func LoadEnv(prefix string, cfg interface{}) error

func LoadFile

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

func LoadFlags

func LoadFlags(cfg interface{}) error

func RegisterCustomMarshaler

func RegisterCustomMarshaler[T any](marshaler func(T) ([]byte, error))

func RegisterCustomUnmarshaler

func RegisterCustomUnmarshaler[T any](unmarshaler func(*T, []byte) error)

func SetEnvPrefix

func SetEnvPrefix(prefix string)

func SetExpandEnv added in v1.1.0

func SetExpandEnv(expand bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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