setting

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetString               = viper.GetString   // 获取字符串
	GetBool                 = viper.GetBool     // 获取 bool
	GetDuration             = viper.GetDuration // 获取时间长度
	GetInt                  = viper.GetInt      // 获取整形
	GetInt32                = viper.GetInt32
	GetInt64                = viper.GetInt64 // 获取64位整形
	GetUint                 = viper.GetUint
	GetUint16               = viper.GetUint16
	GetUint32               = viper.GetUint32
	GetUint64               = viper.GetUint64
	GetTime                 = viper.GetTime
	GetIntSlice             = viper.GetIntSlice
	GetFloat64              = viper.GetFloat64
	GetStringSlice          = viper.GetStringSlice
	GetStringMap            = viper.GetStringMap
	GetStringMapString      = viper.GetStringMapString
	GetStringMapStringSlice = viper.GetStringMapStringSlice
	GetSizeInBytes          = viper.GetSizeInBytes
)

导出函数, 如果需要使用其他函数. 参考: https://github.com/spf13/viper/blob/master/viper.go

Functions

This section is empty.

Types

type Settings

type Settings = viper.Viper

func GetSettings

func GetSettings() *Settings

func Init

func Init(fileName string) *Settings

func NewSettings

func NewSettings(fileName string) *Settings

Jump to

Keyboard shortcuts

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