Documentation
¶
Overview ¶
Package clivar provides syntactic sugar for working with the flag package. Allows you to describe using structure tags how to use flag to fill in this structure.
Index ¶
Constants ¶
View Source
const ( TagCliExample = "NAME[description key]:valueType=defaultValue" CountPartsTagData = 2 CountPartsNameType = 2 CountPartsNameDescription = 2 )
View Source
const ( ValueTypeString = "string" ValueTypeInt = "int" ValueTypeFloat64 = "float64" ValueTypeBool = "bool" ValueTypeSliceStrings = "SliceStrings" )
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(structData interface{}) error
Load field of target struct from flag like described in tags
func NewTagProcessor ¶
func NewTagProcessor() refavour.TagProcessor
Types ¶
type CliVar ¶
CliVar describe tag for struct receiver
func (*CliVar) GetFloat64 ¶
GetFloat64 read float64 value from flag
type SliceStrings ¶ added in v0.0.104
type SliceStrings []string // separator = ","
Click to show internal directories.
Click to hide internal directories.