config

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DATA string

-X 'github.com/fox-one/pkg/config.DATA=$(DATA)'

Functions

func AutomaticLoadEnv added in v1.3.1

func AutomaticLoadEnv(prefix string)

load os environments to viper defaults with prefix "fox" FOX_DB__NAME -> db.name FOX_DB__BROKER_ID -> db.broker_id

func Load

func Load(configFile string, typ string, v interface{}) error

func LoadJson

func LoadJson(configFile string, v interface{}) error

func LoadYaml

func LoadYaml(configFile string, v interface{}) error

func SetDefault added in v1.2.7

func SetDefault(key string, value interface{})

func SetDefaults added in v1.2.7

func SetDefaults(defaults H)

Types

type H added in v1.2.7

type H map[string]interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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