Documentation ¶
Index ¶
- func OnErr(err error)
- type ConfigUtil
- func (this *ConfigUtil) Bool(k string) bool
- func (this *ConfigUtil) BoolDefault(k string, d bool) bool
- func (this *ConfigUtil) Float32(k string) float32
- func (this *ConfigUtil) Float32Default(k string, d float32) float32
- func (this *ConfigUtil) Float64(k string) float64
- func (this *ConfigUtil) Float64Default(k string, d float64) float64
- func (this *ConfigUtil) Int(k string) int
- func (this *ConfigUtil) IntDefault(k string, d int) int
- func (this *ConfigUtil) ParseConfig() map[string]string
- func (this *ConfigUtil) String(k string) string
- func (this *ConfigUtil) StringDefault(k, d string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigUtil ¶
type ConfigUtil struct {
// contains filtered or unexported fields
}
func ConfigUtilOf ¶
func ConfigUtilOf(filePath string) *ConfigUtil
func (*ConfigUtil) Bool ¶
func (this *ConfigUtil) Bool(k string) bool
func (*ConfigUtil) BoolDefault ¶
func (this *ConfigUtil) BoolDefault(k string, d bool) bool
func (*ConfigUtil) Float32 ¶
func (this *ConfigUtil) Float32(k string) float32
func (*ConfigUtil) Float32Default ¶
func (this *ConfigUtil) Float32Default(k string, d float32) float32
func (*ConfigUtil) Float64 ¶
func (this *ConfigUtil) Float64(k string) float64
func (*ConfigUtil) Float64Default ¶
func (this *ConfigUtil) Float64Default(k string, d float64) float64
func (*ConfigUtil) Int ¶
func (this *ConfigUtil) Int(k string) int
func (*ConfigUtil) IntDefault ¶
func (this *ConfigUtil) IntDefault(k string, d int) int
func (*ConfigUtil) ParseConfig ¶
func (this *ConfigUtil) ParseConfig() map[string]string
*
- @Author zeusure
- @Description: 解析配置文件,逐行读取,格式为 key = value
- @param filePath
- @return map[string]interface{}
func (*ConfigUtil) String ¶
func (this *ConfigUtil) String(k string) string
func (*ConfigUtil) StringDefault ¶
func (this *ConfigUtil) StringDefault(k, d string) string
Click to show internal directories.
Click to hide internal directories.