urfave-cli/flag-types.json

114 lines
2.5 KiB
JSON
Raw Normal View History

[
{
"name": "Bool",
"type": "bool",
"value": false,
"dest": true,
2016-07-10 16:50:57 +00:00
"context_default": "false",
"parser": "strconv.ParseBool(f.Value.String())"
},
{
"name": "BoolT",
"type": "bool",
"value": false,
"dest": true,
"doctail": " that is true by default",
2016-07-10 16:50:57 +00:00
"context_default": "false",
"parser": "strconv.ParseBool(f.Value.String())"
},
{
"name": "Duration",
"type": "time.Duration",
"value": true,
"dest": true,
"doctail": " (see https://golang.org/pkg/time/#ParseDuration)",
2016-07-10 16:50:57 +00:00
"context_default": "0",
"parser": "time.ParseDuration(f.Value.String())"
},
{
"name": "Float64",
"type": "float64",
"value": true,
"dest": true,
2016-07-10 16:50:57 +00:00
"context_default": "0",
"parser": "strconv.ParseFloat(f.Value.String(), 64)"
},
{
"name": "Generic",
"type": "Generic",
"value": true,
"dest": false,
"context_default": "nil",
"context_type": "interface{}"
},
{
"name": "Int64",
"type": "int64",
"value": true,
"dest": true,
2016-07-10 16:50:57 +00:00
"context_default": "0",
"parser": "strconv.ParseInt(f.Value.String(), 0, 64)"
},
{
"name": "Int",
"type": "int",
"value": true,
"dest": true,
2016-07-10 16:50:57 +00:00
"context_default": "0",
"parser": "strconv.ParseInt(f.Value.String(), 0, 64)",
"parser_cast": "int(parsed)"
},
{
"name": "IntSlice",
"type": "*IntSlice",
"value": true,
"dest": false,
"context_default": "nil",
2016-07-10 16:50:57 +00:00
"context_type": "[]int",
"parser": "(f.Value.(*IntSlice)).Value(), error(nil)"
},
{
"name": "Int64Slice",
"type": "*Int64Slice",
"value": true,
"dest": false,
"context_default": "nil",
2016-07-10 16:50:57 +00:00
"context_type": "[]int64",
"parser": "(f.Value.(*Int64Slice)).Value(), error(nil)"
},
{
"name": "String",
"type": "string",
"value": true,
"dest": true,
2016-07-10 16:50:57 +00:00
"context_default": "\"\"",
"parser": "f.Value.String(), error(nil)"
},
{
"name": "StringSlice",
"type": "*StringSlice",
"value": true,
"dest": false,
"context_default": "nil",
2016-07-10 16:50:57 +00:00
"context_type": "[]string",
"parser": "(f.Value.(*StringSlice)).Value(), error(nil)"
},
{
"name": "Uint64",
"type": "uint64",
"value": true,
"dest": true,
2016-07-10 16:50:57 +00:00
"context_default": "0",
"parser": "strconv.ParseUint(f.Value.String(), 0, 64)"
},
{
"name": "Uint",
"type": "uint",
"value": true,
"dest": true,
2016-07-10 16:50:57 +00:00
"context_default": "0",
"parser": "strconv.ParseUint(f.Value.String(), 0, 64)",
"parser_cast": "uint(parsed)"
}
]