summaryrefslogtreecommitdiff
path: root/parse.go
diff options
context:
space:
mode:
authorPablo Diaz <[email protected]>2022-05-20 17:35:02 +0200
committerIlja Neumann <[email protected]>2023-06-03 02:39:42 +0200
commit0280e6e5911d4198f69eae9c876722fdf6149b89 (patch)
tree2d97782aae35ffdab788b8cacfcfaa1fd4b056d2 /parse.go
parente25b4707a7d6c63ff6910c1e1bcb416cb8debfb2 (diff)
ignores short and long parameters
Diffstat (limited to 'parse.go')
-rw-r--r--parse.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/parse.go b/parse.go
index be77924..e5df067 100644
--- a/parse.go
+++ b/parse.go
@@ -360,11 +360,6 @@ func cmdFromStruct(name string, dest path, t reflect.Type) (*command, error) {
case strings.HasPrefix(key, "--"):
spec.long = key[2:]
case strings.HasPrefix(key, "-"):
- if len(key) != 2 {
- errs = append(errs, fmt.Sprintf("%s.%s: short arguments must be one character only",
- t.Name(), field.Name))
- return false
- }
spec.short = key[1:]
case key == "required":
spec.required = true