cfg

package
v0.2.18 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = cfg.New("")
View Source
var ConfigDef = cfg.New("")

Functions

func GetBool added in v0.1.9

func GetBool(key string, defaultVal bool) bool

GetBool 获取bool类型配置

func GetBoolFlag added in v0.1.6

func GetBoolFlag(name string) bool

func GetInt added in v0.1.9

func GetInt(key string, defaultVal int) int

GetInt 获取int类型配置

func GetInt64 added in v0.2.5

func GetInt64(key string, defaultVal int64) int64

GetInt64 获取int类型配置

func GetIntFlag

func GetIntFlag(name string) int

func GetSliceString added in v0.2.5

func GetSliceString(key string, defaultVal []string) []string

GetSliceString 获取slice

func GetString added in v0.1.7

func GetString(key string, defaultVal string) string

GetString 获取字符型配置

func GetStringFlag

func GetStringFlag(name string) string

func NewFlagParam

func NewFlagParam() *flagParam

NewFlagParam create flag

func ParseParams

func ParseParams()

func SetBoolFlag added in v0.1.6

func SetBoolFlag(name string, value bool, usage string)

SetBoolFlag register a bool params

func SetIntFlag

func SetIntFlag(name string, value int, usage string)

SetIntFlag register a int params

func SetStringFlag

func SetStringFlag(name string, value string, usage string)

SetStringFlag register a string params

func StartConfig

func StartConfig()

Types

This section is empty.

Jump to

Keyboard shortcuts

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