viper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetEnvConfig

func GetEnvConfig(key string) string

获取配置文件优先获取环境变量(返回string类型)

func GetEnvConfigBool

func GetEnvConfigBool(key string) bool

获取配置文件优先获取环境变量(返回Bool类型)

func GetEnvConfigFloat

func GetEnvConfigFloat(key string) float64

获取配置文件优先获取环境变量(返回Float类型)

func GetEnvConfigInt

func GetEnvConfigInt(key string) int64

获取配置文件优先获取环境变量(返回int类型)

func NewConfig

func NewConfig(filePath string, fileName string)

初始化配置文件 filePath 配置文件路径 fileName 配置文件名称(不需要文件后缀)

Types

This section is empty.

Jump to

Keyboard shortcuts

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