cfg

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

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 GetIntFlag

func GetIntFlag(name string) int

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