json2struct
Create a go struct out of a json file. This will take either pipe from stdin or from a json file. (Todo: Perhaps copy it from clipboard???)
This is actually a rewrite of the json2struct command found in github.com/yudppp/json2struct I changed it to suit my needs. I've useed structs generated by this in many programs, some of them are in production without an issue. That being said, it's free, it's MIT licensed. If it blows up and causes major damage in any way -- well I didn't force you to use it.
Usage:
File In / file out
json2struct -f infile.json -o outfile.go -n structname
This will output in a file. outfile.go.
Pipe in / file out
json2struct -f infile.json -n structname
Pipe in / standard out
cat somejsonfile.json | json2struct -n structname