config

package
v0.0.0-...-e9625fd Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvLocal = "local"
	EnvDev   = "development"
	EnvStg   = "staging"
	EnvProd  = "production"
)

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(cName, cPath, cType string, marshalFn func())

InitConfig sets configuration info and marshal config struct via marshalFn. e.g.

common.InitConfig(cName, cPath, cType, func() {

if err := viper.Unmarshal(&c); err != nil {
		panic("config file unmarshal failed")
		}
})

Types

This section is empty.

Jump to

Keyboard shortcuts

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