config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Toml added in v1.1.0

type Toml struct {
	// contains filtered or unexported fields
}

Toml toml配置文件

func (Toml) Get added in v1.1.0

func (c Toml) Get(key string) interface{}

Get 获取配置项

func (Toml) GetBool added in v1.1.0

func (c Toml) GetBool(key string) bool

GetBool 获取配置项并转为bool

func (Toml) GetInt added in v1.1.0

func (c Toml) GetInt(key string) int

GetInt 获取配置项并转为Int

func (Toml) GetString added in v1.1.0

func (c Toml) GetString(key string) string

GetString 获取配置项并转为String

func (*Toml) GetStringArray added in v1.1.0

func (c *Toml) GetStringArray(key string) []string

GetStringArray 获取配置项并转为 []string

func (Toml) Init added in v1.1.0

func (c Toml) Init(configPath string) (Toml, error)

Init 加载配置文件

func (Toml) ToMap added in v1.1.0

func (c Toml) ToMap() map[string]interface{}

ToMap 配置文件转Map

Jump to

Keyboard shortcuts

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