2016-06-23 04:56:44 +00:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"name": "Bool",
|
|
|
|
"type": "bool",
|
|
|
|
"value": false,
|
2019-08-03 16:45:43 +00:00
|
|
|
"dest": true,
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_default": "false",
|
|
|
|
"parser": "strconv.ParseBool(f.Value.String())"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "BoolT",
|
|
|
|
"type": "bool",
|
|
|
|
"value": false,
|
2019-08-03 16:45:43 +00:00
|
|
|
"dest": true,
|
2016-06-23 04:56:44 +00:00
|
|
|
"doctail": " that is true by default",
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_default": "false",
|
|
|
|
"parser": "strconv.ParseBool(f.Value.String())"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Duration",
|
|
|
|
"type": "time.Duration",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
|
|
|
"dest": true,
|
2016-06-23 04:56:44 +00:00
|
|
|
"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())"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Float64",
|
|
|
|
"type": "float64",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
|
|
|
"dest": true,
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_default": "0",
|
|
|
|
"parser": "strconv.ParseFloat(f.Value.String(), 64)"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Generic",
|
|
|
|
"type": "Generic",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
2016-06-23 04:56:44 +00:00
|
|
|
"dest": false,
|
|
|
|
"context_default": "nil",
|
|
|
|
"context_type": "interface{}"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Int64",
|
|
|
|
"type": "int64",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
|
|
|
"dest": true,
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_default": "0",
|
|
|
|
"parser": "strconv.ParseInt(f.Value.String(), 0, 64)"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Int",
|
|
|
|
"type": "int",
|
2019-08-03 16:45:43 +00:00
|
|
|
"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)"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "IntSlice",
|
|
|
|
"type": "*IntSlice",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
2016-06-23 04:56:44 +00:00
|
|
|
"dest": false,
|
|
|
|
"context_default": "nil",
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_type": "[]int",
|
|
|
|
"parser": "(f.Value.(*IntSlice)).Value(), error(nil)"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Int64Slice",
|
|
|
|
"type": "*Int64Slice",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
2016-06-23 04:56:44 +00:00
|
|
|
"dest": false,
|
|
|
|
"context_default": "nil",
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_type": "[]int64",
|
|
|
|
"parser": "(f.Value.(*Int64Slice)).Value(), error(nil)"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "String",
|
|
|
|
"type": "string",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
|
|
|
"dest": true,
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_default": "\"\"",
|
|
|
|
"parser": "f.Value.String(), error(nil)"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "StringSlice",
|
|
|
|
"type": "*StringSlice",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
2016-06-23 04:56:44 +00:00
|
|
|
"dest": false,
|
|
|
|
"context_default": "nil",
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_type": "[]string",
|
|
|
|
"parser": "(f.Value.(*StringSlice)).Value(), error(nil)"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Uint64",
|
|
|
|
"type": "uint64",
|
2019-08-03 16:45:43 +00:00
|
|
|
"value": true,
|
|
|
|
"dest": true,
|
2016-07-10 16:50:57 +00:00
|
|
|
"context_default": "0",
|
|
|
|
"parser": "strconv.ParseUint(f.Value.String(), 0, 64)"
|
2016-06-23 04:56:44 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Uint",
|
|
|
|
"type": "uint",
|
2019-08-03 16:45:43 +00:00
|
|
|
"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)"
|
2016-06-23 04:56:44 +00:00
|
|
|
}
|
|
|
|
]
|