用于生成Go的Model文件,数据库操作太过于麻烦,依靠工具可以直接生成model对象,默认使用的是xorm映射。 需要支持Go mod ,所以版本最好1.11以上 下载: go get -u github.com/anthony-dong/orm-generator 执行 ./build.sh 或者 release里下载压缩版 ~/Downloads/orm-generator-1.0 % ls LICENSE README.md bin build.sh cmd generator go.mod go.sum utils ~/Downloads/orm-generator-1.0 % ./build.sh GOPATH: /Users/sgcx015/go GOBIN: /Users/sgcx015/Downloads/orm-generator-1.0/bin/ CURDIR: /Users/sgcx015/Downloads/orm-generator-1.0 WORK=/var/folders/cs/_wm77lv95j5d88s_q9vr959w0000gn/T/go-build403299929 build finished sgcx015@SGCX015deMacBook-Pro:~/Downloads/orm-generator-1.0 % bin/orm-generator 快速开始 ~/go/code/orm-generator (master*) % bin/orm-generator -u=root -p=123456 -d=xorm -t=users -tag=xorm generate template finished ~/go/code/orm-generator/tmp (master*) % cat tmp/users.go package model import ( "time" ) type Users struct { ID uint32 `xorm:"id"` Name string `xorm:"name"` Age uint32 `xorm:"age"` Date time.Time `xorm:"date"` ClassID uint32 `xorm:"class_id"` } func (u Users) TableName() string { return "users"mixcloud.com/2uz9741e/?mode=desktop&ref_=m_ft_llx
mixcloud.com/4uw1epr8/?mode=desktop&ref_=m_ft_fbp
mixcloud.com/uh6qpo8u/?mode=desktop&ref_=m_ft_nnh
mixcloud.com/y3lf5pij/?mode=desktop&ref_=m_ft_dhv
mixcloud.com/o5f1gc58/?mode=desktop&ref_=m_ft_vjp
mixcloud.com/mrvx4sst/?mode=desktop&ref_=m_ft_pbb
mixcloud.com/53xgaalh/?mode=desktop&ref_=m_ft_nlp
mixcloud.com/zx8orwm6/?mode=desktop&ref_=m_ft_hrd
mixcloud.com/ljz4va26/?mode=desktop&ref_=m_ft_pzf
mixcloud.com/coxb0ewl/?mode=desktop&ref_=m_ft_tht
mixcloud.com/efte7ylv/?mode=desktop&ref_=m_ft_zxr
mixcloud.com/h4y35ad7/?mode=desktop&ref_=m_ft_xlh
mixcloud.com/wa1ustfv/?mode=desktop&ref_=m_ft_zbz
mixcloud.com/awtqibxp/?mode=desktop&ref_=m_ft_jvd
mixcloud.com/yh2fmd56/?mode=desktop&ref_=m_ft_frl
mixcloud.com/kobraaya/?mode=desktop&ref_=m_ft_zxd
mixcloud.com/a642wwg0/?mode=desktop&ref_=m_ft_pph
mixcloud.com/agc8ycou/?mode=desktop&ref_=m_ft_vhp
mixcloud.com/gbknnvzh/?mode=desktop&ref_=m_ft_htn
mixcloud.com/i2viqo0w/?mode=desktop&ref_=m_ft_ljl
mixcloud.com/0gaioscc/?mode=desktop&ref_=m_ft_rpp
mixcloud.com/dq0385sr/?mode=desktop&ref_=m_ft_jvh
mixcloud.com/78f8nbu2/?mode=desktop&ref_=m_ft_llf
mixcloud.com/x6jhicul/?mode=desktop&ref_=m_ft_hrp
mixcloud.com/alx8i0zr/?mode=desktop&ref_=m_ft_ttf
mixcloud.com/1yjk93d4/?mode=desktop&ref_=m_ft_vhr
mixcloud.com/rr48sn18/?mode=desktop&ref_=m_ft_lxp
mixcloud.com/u8iyw01k/?mode=desktop&ref_=m_ft_fdn
mixcloud.com/lgf7rk77/?mode=desktop&ref_=m_ft_vhp
mixcloud.com/y8as6blm/?mode=desktop&ref_=m_ft_ffn
mixcloud.com/oujncdn3/?mode=desktop&ref_=m_ft_frn
mixcloud.com/59t13951/?mode=desktop&ref_=m_ft_fxb
mixcloud.com/8oh6mi54/?mode=desktop&ref_=m_ft_fdh
mixcloud.com/paz96ssw/?mode=desktop&ref_=m_ft_zxd
mixcloud.com/g4466iey/?mode=desktop&ref_=m_ft_ljd
mixcloud.com/20w44q2s/?mode=desktop&ref_=m_ft_jvd
mixcloud.com/eyjtnqbd/?mode=desktop&ref_=m_ft_lxf
mixcloud.com/okx7aby6/?mode=desktop&ref_=m_ft_fdh
mixcloud.com/m7w3rott/?mode=desktop&ref_=m_ft_pjt
mixcloud.com/uh1vp20l/?mode=desktop&ref_=m_ft_lxp
mixcloud.com/g3jss3qs/?mode=desktop&ref_=m_ft_bzv
mixcloud.com/ykosaugy/?mode=desktop&ref_=m_ft_zvz
mixcloud.com/8sinoort/?mode=desktop&ref_=m_ft_trx
mixcloud.com/suifiqb9/?mode=desktop&ref_=m_ft_vjf
mixcloud.com/cx5dts24/?mode=desktop&ref_=m_ft_fjr
mixcloud.com/m5b7kjq8/?mode=desktop&ref_=m_ft_bnv
mixcloud.com/sc2l0por/?mode=desktop&ref_=m_ft_hfn
mixcloud.com/6egy28a2/?mode=desktop&ref_=m_ft_rhh
mixcloud.com/hx0kl4cs/?mode=desktop&ref_=m_ft_rpx
mixcloud.com/8oan0dgh/?mode=desktop&ref_=m_ft_lnv
mixcloud.com/m0jwi8xi/?mode=desktop&ref_=m_ft_hfd
mixcloud.com/vrndr9sp/?mode=desktop&ref_=m_ft_rbf
mixcloud.com/0s6j2crt/?mode=desktop&ref_=m_ft_ljd
mixcloud.com/3gkuxc7x/?mode=desktop&ref_=m_ft_trb
mixcloud.com/y4wiyoy8/?mode=desktop&ref_=m_ft_xzf
mixcloud.com/7f9pznn5/?mode=desktop&ref_=m_ft_jdl
mixcloud.com/6h2zqg9l/?mode=desktop&ref_=m_ft_tfx
mixcloud.com/2ptthrz1/?mode=desktop&ref_=m_ft_trh
mixcloud.com/hso9iawr/?mode=desktop&ref_=m_ft_hhp
mixcloud.com/7w5a6imf/?mode=desktop&ref_=m_ft_tfl
mixcloud.com/jhz4uot7/?mode=desktop&ref_=m_ft_bpz
mixcloud.com/1t2011gv/?mode=desktop&ref_=m_ft_fdh
mixcloud.com/e6ljk9rk/?mode=desktop&ref_=m_ft_zlf
mixcloud.com/15r046wa/?mode=desktop&ref_=m_ft_hrx
mixcloud.com/qgxlkdos/?mode=desktop&ref_=m_ft_fpd
mixcloud.com/09m0509v/?mode=desktop&ref_=m_ft_trz
mixcloud.com/iem3nbl9/?mode=desktop&ref_=m_ft_ttr
mixcloud.com/6utl9iqs/?mode=desktop&ref_=m_ft_pbd
mixcloud.com/m8w92zh0/?mode=desktop&ref_=m_ft_nnb
mixcloud.com/8qeoayks/?mode=desktop&ref_=m_ft_lhd
mixcloud.com/9emqegvb/?mode=desktop&ref_=m_ft_dnz
mixcloud.com/80qklpsm/?mode=desktop&ref_=m_ft_bnl
mixcloud.com/z2a81gx3/?mode=desktop&ref_=m_ft_vhp
mixcloud.com/vlln0kgi/?mode=desktop&ref_=m_ft_hjl
mixcloud.com/pm9dapj5/?mode=desktop&ref_=m_ft_znh
mixcloud.com/x1rn8hsq/?mode=desktop&ref_=m_ft_tbz
mixcloud.com/85hss96b/?mode=desktop&ref_=m_ft_nzt
mixcloud.com/jgwjg29c/?mode=desktop&ref_=m_ft_htb
mixcloud.com/hofq6y1d/?mode=desktop&ref_=m_ft_rbt
mixcloud.com/xe3r2kba/?mode=desktop&ref_=m_ft_thh
mixcloud.com/f2q2wd49/?mode=desktop&ref_=m_ft_plh
mixcloud.com/lgqkeck3/?mode=desktop&ref_=m_ft_rjd
mixcloud.com/igw5ix11/?mode=desktop&ref_=m_ft_bdd
来源:oschina
链接:https://my.oschina.net/u/4539494/blog/4305631