Skip to content
golangidPublic

About

Struct Generator

Topics

Resources

Stars

6 stars

Watchers

4 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Struct Generator from database

gostruct will generate struct from your DB

Build Status codecov License

Index

You can file an Issue.

Support

Currently only support Mysql for now.

Getting Started

Download

go get -u github.com/golangid/gostruct

Example

Creating Configurations

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

Example to use Faker

About

Struct Generator

Topics

Resources

Stars

6 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages