zconfig

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auto

func Auto() configOption

Configure a struct using any command line flags, environment variables, variables in .env and finally, values set using default tags

func Defaults

func Defaults() configOption

Configure using default tags configured on the struct

func Env

func Env(paths ...string) configOption

Configure a struct using values defined in the environment and .env files

func EnvFiles added in v0.8.12

func EnvFiles(paths ...string) configOption

Configure a struct using values from .env files

func Flag

func Flag(args []string) configOption

Configure a struct using command line flags

Types

type Configurer

type Configurer struct {
	// contains filtered or unexported fields
}

func New

func New(options ...configOption) *Configurer

Create a configurer

func (*Configurer) Parse

func (c *Configurer) Parse(val interface{}) (err error)

Actually update the struct given the values provided

Jump to

Keyboard shortcuts

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