Discover Packages
github.com/CaiJinKen/gostruct
command
module
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Nov 22, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
gostruct
This is an open source tool convert mysql table structure to golang`s struct and written by pure golang.
If you want to get a beautiful struct, make sure the gofmt has been installed and in the $PATH.
Install:
go get github.com/CaiJinKen/gostruct
Usage:
gostruct -i users.sql -o users.go
get struct from db connection
gostruct -d `user:password@tcp(host:port)/db_name` -t users -o ./models/users.go
This tool also can:
generate json
tag(default) and gorm
tag
print the struct(default)
Help:
gostruct --help
or
gostruct -h
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.