You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be convenient to pass in a pointer to a struct for options. Flaggy could loop over the struct fields, and depending on the property type and name, assign variables into it.
The text was updated successfully, but these errors were encountered:
typeOptionsstruct {
Namestring`flaggy:"n,name,rest is description"`// short=n, long=nameAddressstring`flaggy:",address"`// no short, long=address, without descriptionSubscribedbool`flaggy:"s"`// short=s, no long, without descriptionQuietbool`flaggy:"q,,quiet mode"`// short=q, no long
}
I am leaning toward calling this "out of scope" for flaggy because its so radically different than the currently patterns. I think go-flags already does a pretty good job of this.
The user experience will likely suffer if there are too many ways to do things.
I'm leaving this open for now for more discussion.
It could be convenient to pass in a pointer to a struct for options. Flaggy could loop over the struct fields, and depending on the property type and name, assign variables into it.
The text was updated successfully, but these errors were encountered: