summaryrefslogtreecommitdiff
path: root/parse.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2021-01-31 18:29:22 -0800
committerAlex Flint <[email protected]>2021-01-31 18:29:22 -0800
commitaa6cb95149b650d07de76176d652b7280c86db06 (patch)
treeeb5cf751ccfc98a9cdceb401c80afde1b4f406fe /parse.go
parentb91c03d2c6c9e6429f3947f6b6e83321a56aa0f2 (diff)
skip unexported fields
Diffstat (limited to 'parse.go')
-rw-r--r--parse.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.go b/parse.go
index 8fdbd9d..0c65397 100644
--- a/parse.go
+++ b/parse.go
@@ -263,7 +263,7 @@ func cmdFromStruct(name string, dest path, t reflect.Type) (*command, error) {
walkFields(t, func(field reflect.StructField, t reflect.Type) bool {
// Check for the ignore switch in the tag
tag := field.Tag.Get("arg")
- if tag == "-" {
+ if tag == "-" || !isExported(field.Name) {
return false
}