-
-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Description
I'm using inline embedded structs to add structure to my config for json encoding without having to explicitly name a bunch of sub-structs, but go-arg doesn't like it:
var args struct {
A struct {
B string
C string
}
D string
}
arg.MustParse(&args)
$ go run . -h
.A: struct { B string; C string } fields are not supported
exit status 255
I see that the docs say it supports embedded structs, but it doesn't mention inline embedded struct (my name, perhaps there's a more formal name). Is this intentionally unsupported, or is it more of an oversight / "didn't think of doing it like that before"? Would you consider adding support for these types of struct definitions?
Metadata
Metadata
Assignees
Labels
No labels