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
type MyFlags struct {
Field1 string `long:"field1" json:"field1,omitempty"`
Field2 int `long:"field2" json:"field2"`
// ...
}
We could write a custom JSON processor that uses long as the JSON field name when json is not present, but it would probably be simpler to have zflags use the json field if long is not present.
This could get us closer to allowing JSON/YAML config in addition to the INI format.
The text was updated successfully, but these errors were encountered:
I often end up with code like this:
We could write a custom JSON processor that uses
long
as the JSON field name whenjson
is not present, but it would probably be simpler to have zflags use thejson
field iflong
is not present.This could get us closer to allowing JSON/YAML config in addition to the INI format.
The text was updated successfully, but these errors were encountered: