用于生成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/4565wy6r/?mode=desktop&ref_=m_ft_bpb
mixcloud.com/ci6ekosq/?mode=desktop&ref_=m_ft_hhr
mixcloud.com/odui14dl/?mode=desktop&ref_=m_ft_ffd
mixcloud.com/446ae0i8/?mode=desktop&ref_=m_ft_pxl
mixcloud.com/0nxjnpsq/?mode=desktop&ref_=m_ft_ttf
mixcloud.com/fc3meyqx/?mode=desktop&ref_=m_ft_lxt
mixcloud.com/1x7hp9x3/?mode=desktop&ref_=m_ft_dlh
mixcloud.com/4owoyii0/?mode=desktop&ref_=m_ft_pnt
mixcloud.com/f1fz3fl7/?mode=desktop&ref_=m_ft_vjp
mixcloud.com/5s1suso6/?mode=desktop&ref_=m_ft_lvh
mixcloud.com/k6kca4iq/?mode=desktop&ref_=m_ft_fpv
mixcloud.com/g293u123/?mode=desktop&ref_=m_ft_znj
mixcloud.com/7x33j1vb/?mode=desktop&ref_=m_ft_jhz
mixcloud.com/khl9rj7o/?mode=desktop&ref_=m_ft_nvt
mixcloud.com/vln852vk/?mode=desktop&ref_=m_ft_ffp
mixcloud.com/fcqhjtpl/?mode=desktop&ref_=m_ft_lxj
mixcloud.com/apv5zqpe/?mode=desktop&ref_=m_ft_hvf
mixcloud.com/z84r3851/?mode=desktop&ref_=m_ft_xfh
mixcloud.com/d2h6tpj0/?mode=desktop&ref_=m_ft_xjr
mixcloud.com/8b2mwls5/?mode=desktop&ref_=m_ft_bhb
mixcloud.com/zcswy68x/?mode=desktop&ref_=m_ft_vpz
mixcloud.com/in222032/?mode=desktop&ref_=m_ft_dfd
mixcloud.com/q5xhedk4/?mode=desktop&ref_=m_ft_rpr
mixcloud.com/3a2hv01z/?mode=desktop&ref_=m_ft_lvh
mixcloud.com/fcar5m15/?mode=desktop&ref_=m_ft_nzv
mixcloud.com/vddh1ssl/?mode=desktop&ref_=m_ft_pzf
mixcloud.com/e4l34uz4/?mode=desktop&ref_=m_ft_bll
mixcloud.com/6t6610vw/?mode=desktop&ref_=m_ft_nzt
mixcloud.com/5ekv3lf1/?mode=desktop&ref_=m_ft_xlv
mixcloud.com/g8mu44u4/?mode=desktop&ref_=m_ft_rlp
mixcloud.com/fi5pguoa/?mode=desktop&ref_=m_ft_zzr
mixcloud.com/lihl4igo/?mode=desktop&ref_=m_ft_rvd
mixcloud.com/7pl7ps32/?mode=desktop&ref_=m_ft_zzr
mixcloud.com/ddle6vns/?mode=desktop&ref_=m_ft_pbx
mixcloud.com/wu42s68q/?mode=desktop&ref_=m_ft_jfj
mixcloud.com/8q568624/?mode=desktop&ref_=m_ft_fxx
mixcloud.com/r8bh5jdi/?mode=desktop&ref_=m_ft_xvb
mixcloud.com/52c35b3w/?mode=desktop&ref_=m_ft_pnp
mixcloud.com/41t9vxp8/?mode=desktop&ref_=m_ft_tlj
mixcloud.com/61b9ydu8/?mode=desktop&ref_=m_ft_bnh
mixcloud.com/2b1ax54u/?mode=desktop&ref_=m_ft_rpj
mixcloud.com/49lyp5xl/?mode=desktop&ref_=m_ft_vhb
mixcloud.com/ibak9wiz/?mode=desktop&ref_=m_ft_nld
mixcloud.com/yo7i036a/?mode=desktop&ref_=m_ft_jjp
mixcloud.com/hcqv3hpy/?mode=desktop&ref_=m_ft_rph
mixcloud.com/53f6ie71/?mode=desktop&ref_=m_ft_plt
mixcloud.com/yy8h2jhx/?mode=desktop&ref_=m_ft_vtv
mixcloud.com/vhmqr91y/?mode=desktop&ref_=m_ft_ljf
mixcloud.com/e9zpn2li/?mode=desktop&ref_=m_ft_dzt
mixcloud.com/8x7k99w6/?mode=desktop&ref_=m_ft_drl
mixcloud.com/24jb3enm/?mode=desktop&ref_=m_ft_tpn
mixcloud.com/dfkml9za/?mode=desktop&ref_=m_ft_tft
mixcloud.com/bh0e4ocv/?mode=desktop&ref_=m_ft_hdj
mixcloud.com/3117lrt3/?mode=desktop&ref_=m_ft_rpz
mixcloud.com/2usguo22/?mode=desktop&ref_=m_ft_jhb
mixcloud.com/scu4s2wi/?mode=desktop&ref_=m_ft_jxr
mixcloud.com/q0k04400/?mode=desktop&ref_=m_ft_ppx
mixcloud.com/0rhtftv9/?mode=desktop&ref_=m_ft_lzv
mixcloud.com/t11bjbbn/?mode=desktop&ref_=m_ft_vfh
mixcloud.com/np8hk3qe/?mode=desktop&ref_=m_ft_lxt
mixcloud.com/u3jjoeb5/?mode=desktop&ref_=m_ft_zxr
mixcloud.com/g5qwwpuw/?mode=desktop&ref_=m_ft_dvr
mixcloud.com/xlmgpviz/?mode=desktop&ref_=m_ft_njr
mixcloud.com/tymmotd1/?mode=desktop&ref_=m_ft_frl
mixcloud.com/o1ipgcmb/?mode=desktop&ref_=m_ft_pjj
mixcloud.com/afkplxll/?mode=desktop&ref_=m_ft_jph
mixcloud.com/ib8m2czp/?mode=desktop&ref_=m_ft_nhb
mixcloud.com/lafdwcwj/?mode=desktop&ref_=m_ft_hrh
mixcloud.com/32z78anw/?mode=desktop&ref_=m_ft_nlt
mixcloud.com/of6spiey/?mode=desktop&ref_=m_ft_ltp
mixcloud.com/l386ae7q/?mode=desktop&ref_=m_ft_fbz
mixcloud.com/bwnkqq2b/?mode=desktop&ref_=m_ft_jhf
mixcloud.com/tb1ey07x/?mode=desktop&ref_=m_ft_rpx
mixcloud.com/3lp1oxdx/?mode=desktop&ref_=m_ft_lnp
mixcloud.com/an8jq84e/?mode=desktop&ref_=m_ft_zxl
mixcloud.com/8gee6byz/?mode=desktop&ref_=m_ft_xxn
mixcloud.com/qv4pk27a/?mode=desktop&ref_=m_ft_nnz
mixcloud.com/68f2caa8/?mode=desktop&ref_=m_ft_nrb
mixcloud.com/ui619acx/?mode=desktop&ref_=m_ft_llf
mixcloud.com/wfd6e73g/?mode=desktop&ref_=m_ft_rdb
mixcloud.com/48y8chu0/?mode=desktop&ref_=m_ft_xvb
mixcloud.com/qk910slp/?mode=desktop&ref_=m_ft_hht
mixcloud.com/ww8qs8ks/?mode=desktop&ref_=m_ft_zhb
来源:oschina
链接:https://my.oschina.net/u/4539489/blog/4305605