config

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 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

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

func SetDefault(key string, value interface{})

func SetDefaults

func SetDefaults(defaults H)

Types

type H

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