Struct Generator from database
gostruct will generate struct from your DB
You can file an Issue.
Currently only support Mysql for now.
go get -u github.com/golangid/gostruct
To generate the models, you need to create config.json
in you project folders.
{
"type":"mysql",
"user":"root",
"password":"password",
"host":"127.0.0.1",
"port":"33060",
"dbname":"article"
}
then run from terminal
$GOPATH/bin/gostruct generate
# Example
~/go/bin/gostruct generate