loader

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCmd

func LoadCmd(obj interface{})

LoadCmd defines flags from cmd tags then inject parsed flags values in out object

func LoadEnv

func LoadEnv(obj interface{}, opts *EnvOptions) error

LoadEnv set obj from environment variables

func LoadFile

func LoadFile(filename string, obj interface{}) error

LoadFile unmarshals yaml or json file into obj

Types

type EnvOptions

type EnvOptions struct {
	Prefix     string
	ProcessAll bool
}

EnvOptions is a helper object to pass options to the loader

Jump to

Keyboard shortcuts

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