setting

package
v0.0.0-...-dae8c3a Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ext *ini.File

Ext 扩展配置信息

View Source
var Ini *ini.File

Ini 配置信息

Functions

func Get

func Get(key string, args ...interface{}) string

Get 获取配置项信息, 注意: 此方法必须在 LoadConfigs() 方法之后执行, 否则将无法获取配置信息 key: 配置项名称 顶级配置项获取: config.Get("app_name") 二级配置项获取: config.Get("database.name")

func GetBool

func GetBool(key string) bool

GetBool 得到true/false的值

func GetExt

func GetExt(key string, args ...interface{}) string

GetExt 获取扩展配置项信息, 注意: 此方法必须在 LoadExtConfigs() 方法之后执行, 否则将无法获取配置信息

func GetExtBool

func GetExtBool(key string) bool

GetExtBool 得到true/false的值

func GetExtFloat64

func GetExtFloat64(key string) float64

GetExtFloat64 得到float64的值

func GetExtInt

func GetExtInt(key string) int

GetExtInt 得到Int的值

func GetFloat

func GetFloat(key string) float64

GetFloat 得到float的值

func GetInt

func GetInt(key string) int

GetInt 得到Int的值 请依据自己需要自动对int进行转换

func LoadConfigs

func LoadConfigs(args ...string)

LoadConfigs 加载配置信息

func LoadExtConfigs

func LoadExtConfigs(args ...string)

LoadExtConfigs 加载扩展配置信息

func LoadPlatformConfigs

func LoadPlatformConfigs(db *gorm.DB)

LoadPlatformConfigs 得到平台-站点-配置相关信

func PrintConfigs

func PrintConfigs()

PrintConfigs 打印配置信息

Types

This section is empty.

Jump to

Keyboard shortcuts

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