diff options
| author | Alex Flint <[email protected]> | 2021-01-31 18:46:05 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-31 18:46:05 -0800 |
| commit | 2a23168641ed1fb55f5f4dc72f50bdf15cb65b27 (patch) | |
| tree | eb5cf751ccfc98a9cdceb401c80afde1b4f406fe /parse.go | |
| parent | b91c03d2c6c9e6429f3947f6b6e83321a56aa0f2 (diff) | |
| parent | aa6cb95149b650d07de76176d652b7280c86db06 (diff) | |
Merge pull request #136 from alexflint/ignore-unexported
Skip unexported fields
Diffstat (limited to 'parse.go')
| -rw-r--r-- | parse.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 } |
