gojson
gojson copied to clipboard
Add flag for struct name
Currently all generated structs have the name TestStruct. A flag (optional?) should be added to specify the struct name. I propose -struct
, though perhaps -name
might work.
As of 9d7c991, the -struct flag has been added (and works properly) if -file is also specified explicitly. That is,
gojson -struct Foo -file json_example.json
and
gojson -file json_example.json -struct Foo
both work, but
gojson json_example.json -struct Foo
still uses 'TestStruct' as the name of the struct.
You fixed this six years ago. It's time to close it. :)