{"modulePath":"github.com/WebGameLinux/cli","version":"v0.0.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package resolver\n\n## Constants\n\n```go\nconst CommandEnHelper = `\nNAME:\n   {{.Name}} {{if ne .Desc \"\" }}- {{.Desc}}{{end}}\n\nUSAGE:\n   {{.File}} [global options]\n   {{if ne .Usage \"\"}}\n   {{.Usage}}\n   {{end}}\n\nGLOBAL OPTIONS:\n\t{{range $i, $v := .Arguments}}\n    --{{$v.Name}} {{$v.Usage}} (default:{{$v.DefaultValue}})\n  {{end}}\n`\n```\n\n```go\nconst CommandZhHelper = `\n命令名:\n   {{.Name}} {{if ne .Desc \"\" }}- {{.Desc}}{{end}}\n\n用法 :\n   {{.File}} [可选参数] \n\t {{if ne .Usage \"\"}}\n   {{.Usage}}\n   {{end}}\n\n可选参数:\n   {{range $i, $v := .Arguments}}\n    --{{$v.Name}}   {{$v.Usage}}   (default:{{$v.DefaultValue}})\n  {{end}}\n`\n```\n\n```go\nconst DefStrFlagDiv = `:`\n```\n\n```go\nconst DefStrFlagLineDiv = `\\n`\n```\n\n```go\nconst DefStrFlagLineRune rune = '\\n'\n```\n\n```go\nconst ROOT = \"global\"\n```\n\n```go\nconst StrFlagHidden rune = '#'\n```\n\n```go\nconst StrFlagRequired rune = '@'\n```\n\n```go\nconst TypeRegexpPattern = `^\\[([a-z]+)\\]`\n```\n\n## Variables\n\n```go\nvar SimpleCommandLine = \u0026SimpleCommanderApp{}\n```\n\n## Functions\n\n```go\nfunc Args() (args []*flag.Flag)\n```\n\n```go\nfunc BindBootHandler(handler func(app *SimpleCommanderApp))\n```\n\n```go\nfunc BuildFlagByArgInfoStrArr(info []string) cli.Flag\n```\n\n```go\nfunc DeleteByIndex(arr []string, index int) []string\n```\n\n```go\nfunc FilterArrString(arr []string) []string\n```\n\n```go\nfunc FlagAppend(typeName string, name string, usage string, defs ...interface{}) (string, interface{})\n```\n\n```go\nfunc Get(key string) string\n```\n\n```go\nfunc GetArgN(i int) string\n```\n\n```go\nfunc GetBigInt(key string) int64\n```\n\n```go\nfunc GetBool(key string) bool\n```\n\n```go\nfunc GetFlagNames(names string) (map[string]interface{}, bool)\n```\n\n```go\nfunc GetFlagType(ty string) (map[string]string, bool)\n```\n\n```go\nfunc GetFloat(key string) float64\n```\n\n```go\nfunc GetInt(key string) int\n```\n\n```go\nfunc GetName() string\n```\n\n```go\nfunc GetNum(key string) int\n```\n\n```go\nfunc GetOsArgN(i int) string\n```\n\n```go\nfunc GetOsArgs() []string\n```\n\n```go\nfunc GetValue(key string) interface{}\n```\n\n```go\nfunc ReleaseStdout(stdout *os.File, tmp *os.File)\n```\n\n```go\nfunc Run()\n```\n\n```go\nfunc SliceFlags(row string, slice string) (arr []string)\n```\n\n```go\nfunc Str2Bool(str string) bool\n```\n\n```go\nfunc Str2Float64(str string) float64\n```\n\n```go\nfunc Str2Int(str string) int\n```\n\n```go\nfunc Str2IntArray(nums string) []int\n```\n\n```go\nfunc Str2IntSlice(str string) (arr *cli.IntSlice)\n```\n\n```go\nfunc TemplateParse(tplName string, tplContent string, v interface{}, funcMaps ...template.FuncMap) string\n```\n\n## Types\n\n```go\ntype CommanderAppDto struct {\n\tArguments []*CommanderFlagDto\n\tUsage     string\n\tName      string\n\tDesc      string\n\tVersion   string\n\tFile      string\n}\n```\n命令行应用 体 数据结构\n\n```go\nfunc NewCommanderAppDto() *CommanderAppDto\n```\n\n```go\nfunc (appDto *CommanderAppDto) InitDto(app *SimpleCommanderApp) *CommanderAppDto\n```\n\n```go\ntype CommanderFlagDto struct {\n\tName         string\n\tUsage        string\n\tDefaultValue interface{}\n\tValue        interface{}\n\tRowType      string\n}\n```\n命令参数 数据结构\n\n```go\nfunc BuildFlagDtoByArgInfoStrArr(info []string) *CommanderFlagDto\n```\n\n```go\nfunc NewCommanderFlagDto() *CommanderFlagDto\n```\n\n```go\nfunc ParseFlagsExpress(express string) []*CommanderFlagDto\n```\n\n```go\nfunc (flagDto *CommanderFlagDto) InitFlagDto(name, rowType, usage string, value interface{}, defValue interface{}) *CommanderFlagDto\n```\n初始化\n\n```go\ntype FlagResolver interface {\n\tfmt.Stringer\n\tRow() interface{}\n\tArgs() []cli.Flag\n\tSetSlice(string) FlagResolver\n\tGetSlice() string\n}\n```\n\n```go\nfunc NewFlagsStrWrapper(str ...interface{}) FlagResolver\n```\n\n```go\nfunc StrTemplateResolver(template string, slice ...string) FlagResolver\n```\n\n```go\ntype FlagsStrWrapper struct {\n\tRowStr StringFlags\n\tSlice  string\n\tArgArr []cli.Flag\n}\n```\n\n```go\nfunc StrFlagsWrapper(flags StringFlags, slice ...string) *FlagsStrWrapper\n```\n\n```go\nfunc (wrapper *FlagsStrWrapper) Args() (flags []cli.Flag)\n```\n\n```go\nfunc (wrapper *FlagsStrWrapper) GetSlice() string\n```\n\n```go\nfunc (wrapper *FlagsStrWrapper) Parse()\n```\n\n```go\nfunc (wrapper *FlagsStrWrapper) Row() interface{}\n```\n\n```go\nfunc (wrapper *FlagsStrWrapper) SetSlice(slice string) FlagResolver\n```\n\n```go\nfunc (wrapper *FlagsStrWrapper) String() string\n```\n\n```go\ntype IniParser struct {\n\tFileName string\n\tIM       map[string]map[string]string\n}\n```\n\n```go\nfunc NewIniParser() *IniParser\n```\n\n```go\nfunc (iniP *IniParser) GetName(pName string, vName string) string\n```\n\n```go\nfunc (iniP *IniParser) ParserIniFile(fileName string) error\n```\n\n```go\ntype Local string\n```\n\n```go\nconst (\n\tZhLocal Local = \"zh\"\n\tEnLocal Local = \"en\"\n)\n```\n\n```go\ntype SimpleCommanderApp struct {\n\tUsage       interface{}                  // 用户帮助说明\n\tAutoParse   bool                         // 是否初始时自动解析\n\tParsed      bool                         // 是否已经解析\n\tName        string                       // 命令应用名\n\tDesc        string                       // 命令应用描述\n\tLang        Local                        // 语言\n\tArgumentMap map[string]*CommanderFlagDto // 参数存储容器\n\tBootHandler func(app *SimpleCommanderApp)\n}\n```\n\n```go\nfunc NewSimpleCommanderAppByMap(data map[string]interface{}) *SimpleCommanderApp\n```\n\n```go\nfunc (app *SimpleCommanderApp) AddFlag(ty string, name string, usage string, defs ...interface{})\n```\n\n```go\nfunc (app *SimpleCommanderApp) AddFlagsByStrExpress(tpl string)\n```\n\n```go\nfunc (app *SimpleCommanderApp) Args() (args []*flag.Flag)\n```\n\n```go\nfunc (app *SimpleCommanderApp) Boot()\n```\n\n```go\nfunc (app *SimpleCommanderApp) Get(key string) string\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetArgN(i int) string\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetBigInt(key string) int64\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetBool(key string) bool\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetFloat(key string) float64\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetInt(key string) int\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetName() string\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetNum(key string) int\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetOsArgN(i int) string\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetOsArgs() []string\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetUsage() func()\n```\n\n```go\nfunc (app *SimpleCommanderApp) GetValue(key string) interface{}\n```\n\n```go\nfunc (app *SimpleCommanderApp) HasArg(key string) bool\n```\n\n```go\nfunc (app *SimpleCommanderApp) HelpBoot()\n```\n\n```go\nfunc (app *SimpleCommanderApp) HelpWrapper(usage string) func()\n```\n\n```go\nfunc (app *SimpleCommanderApp) Init()\n```\n\n```go\nfunc (app *SimpleCommanderApp) Parse() bool\n```\n\n```go\nfunc (app *SimpleCommanderApp) PrintUsage()\n```\n\n```go\nfunc (app *SimpleCommanderApp) Run()\n```\n\n```go\nfunc (app *SimpleCommanderApp) Usage2Str() string\n```\n\n```go\ntype SimpleCommanderAppApi interface {\n\tGet(string) string\n\tGetInt(string) int\n\tGetNum(string) int\n\tGetBool(string) bool\n\tGetBigInt(string) int64\n\tGetFloat(string) float64\n\tGetArgN(int) string\n\tGetOsArgs() []string\n\tGetOsArgN(int) string\n\tRun()\n}\n```\n\n```go\ntype SimpleResolver interface {\n\tArgs() []*flag.Flag\n\tcore.AutoInit\n\tcore.BootAble\n\tGetUsage() func()\n\tGetName() string\n\tHelpBoot()\n\tParse() bool\n}\n```\n\n```go\nfunc NewSimpleCommanderApp() SimpleResolver\n```\n\n```go\ntype StringFlags string\n```\n\n```go\nfunc Str2FlagTemplate(str string) StringFlags\n```\n\n```go\nfunc (s StringFlags) Resolver() FlagResolver\n```\n\n```go\nfunc (s StringFlags) String() string\n```\n\n","path":"github.com/WebGameLinux/cli/resolver","name":"resolver","synopsis":"","isRedistributable":true}
