Update generate() function to return string instead of printing result
Add a -struct flag to specify struct name

* This addresses issue #6
* However, -struct only works if -file is also specified explictly
* Also, run gofmt on the file