readconfig

package module
v0.0.0-...-d03e2ce Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 8 Imported by: 0

README

ReadConfig

介绍

Read .config file content line by line with style like key=value

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnErr

func OnErr(err error)

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

Jump to

Keyboard shortcuts

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