config

package
v0.0.0-...-94f6560 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindEnv

func BindEnv(keyName string, envName string)

新增配置项

func Get

func Get(path string, defaultValues ...interface{}) string

func GetBool

func GetBool(path string, defaultValues ...interface{}) bool

func GetFloat64

func GetFloat64(path string, defaultValues ...interface{}) float64

func GetInt

func GetInt(path string, defaultValues ...interface{}) int

get 的 int 版本

func GetInt64

func GetInt64(path string, defaultValues ...interface{}) int64

func GetString

func GetString(path string, defaultValues ...interface{}) string

get 的 string 版本

func GetStringMapString

func GetStringMapString(path string, defaultValues ...interface{}) map[string]string

func GetUint

func GetUint(path string, defaultValues ...interface{}) uint

func InitConfig

func InitConfig(envPrefix string, appointedConfigPath string)

初始化配置信息,完成环境变量和config的加载

func Set

func Set(name string, value interface{})

func WriteConfig

func WriteConfig()

Types

This section is empty.

Jump to

Keyboard shortcuts

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