From c133a5aeb16e0978e3c29f8446ddf02922b7e150 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sat, 3 Aug 2019 22:15:43 +0530 Subject: [PATCH] add explicit true/false choices for value and dest keys due to go default false for bool types --- flag-types.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/flag-types.json b/flag-types.json index 1223107..3306025 100644 --- a/flag-types.json +++ b/flag-types.json @@ -3,6 +3,7 @@ "name": "Bool", "type": "bool", "value": false, + "dest": true, "context_default": "false", "parser": "strconv.ParseBool(f.Value.String())" }, @@ -10,6 +11,7 @@ "name": "BoolT", "type": "bool", "value": false, + "dest": true, "doctail": " that is true by default", "context_default": "false", "parser": "strconv.ParseBool(f.Value.String())" @@ -17,6 +19,8 @@ { "name": "Duration", "type": "time.Duration", + "value": true, + "dest": true, "doctail": " (see https://golang.org/pkg/time/#ParseDuration)", "context_default": "0", "parser": "time.ParseDuration(f.Value.String())" @@ -24,12 +28,15 @@ { "name": "Float64", "type": "float64", + "value": true, + "dest": true, "context_default": "0", "parser": "strconv.ParseFloat(f.Value.String(), 64)" }, { "name": "Generic", "type": "Generic", + "value": true, "dest": false, "context_default": "nil", "context_type": "interface{}" @@ -37,12 +44,16 @@ { "name": "Int64", "type": "int64", + "value": true, + "dest": true, "context_default": "0", "parser": "strconv.ParseInt(f.Value.String(), 0, 64)" }, { "name": "Int", "type": "int", + "value": true, + "dest": true, "context_default": "0", "parser": "strconv.ParseInt(f.Value.String(), 0, 64)", "parser_cast": "int(parsed)" @@ -50,6 +61,7 @@ { "name": "IntSlice", "type": "*IntSlice", + "value": true, "dest": false, "context_default": "nil", "context_type": "[]int", @@ -58,6 +70,7 @@ { "name": "Int64Slice", "type": "*Int64Slice", + "value": true, "dest": false, "context_default": "nil", "context_type": "[]int64", @@ -66,12 +79,15 @@ { "name": "String", "type": "string", + "value": true, + "dest": true, "context_default": "\"\"", "parser": "f.Value.String(), error(nil)" }, { "name": "StringSlice", "type": "*StringSlice", + "value": true, "dest": false, "context_default": "nil", "context_type": "[]string", @@ -80,12 +96,16 @@ { "name": "Uint64", "type": "uint64", + "value": true, + "dest": true, "context_default": "0", "parser": "strconv.ParseUint(f.Value.String(), 0, 64)" }, { "name": "Uint", "type": "uint", + "value": true, + "dest": true, "context_default": "0", "parser": "strconv.ParseUint(f.Value.String(), 0, 64)", "parser_cast": "uint(parsed)"