conf

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig added in v0.3.1

func GetConfig() *viper.Viper

获取当前配置实例

func InitConfig

func InitConfig(conf string) error

初始化配置文件

func IsInited added in v0.3.1

func IsInited() bool

检查配置是否已初始化

func ReadConfigToInt

func ReadConfigToInt(title, key string) int

读取配置文件中的int值

func ReadConfigToString

func ReadConfigToString(title, key string) string

读取配置文件中的string值

func ReadConfigToTimeDuration

func ReadConfigToTimeDuration(title, key string) time.Duration

读取配置文件中的时间值

func SetViperConfig added in v0.3.1

func SetViperConfig(conf *viper.Viper)

设置新的viper配置实例

Types

This section is empty.

Jump to

Keyboard shortcuts

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