用于生成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/pzhguafo/?mode=desktop&ref_=m_ft_trn
mixcloud.com/vnxdluud/?mode=desktop&ref_=m_ft_lxp
mixcloud.com/91954812/?mode=desktop&ref_=m_ft_jtl
mixcloud.com/77661499/?mode=desktop&ref_=m_ft_jvb
mixcloud.com/ksrpjpgd/?mode=desktop&ref_=m_ft_xvv
mixcloud.com/07761427/?mode=desktop&ref_=m_ft_bnz
mixcloud.com/jxubqhjk/?mode=desktop&ref_=m_ft_rrt
mixcloud.com/aiycfpmr/?mode=desktop&ref_=m_ft_tfh
mixcloud.com/zuzhkbvy/?mode=desktop&ref_=m_ft_ltv
mixcloud.com/93987154/?mode=desktop&ref_=m_ft_hvh
mixcloud.com/94575018/?mode=desktop&ref_=m_ft_frn
mixcloud.com/28607634/?mode=desktop&ref_=m_ft_hhl
mixcloud.com/gkmlelpa/?mode=desktop&ref_=m_ft_dbp
mixcloud.com/ulveunia/?mode=desktop&ref_=m_ft_zlv
mixcloud.com/loakkapq/?mode=desktop&ref_=m_ft_bfx
mixcloud.com/30751960/?mode=desktop&ref_=m_ft_ttn
mixcloud.com/vlcbryry/?mode=desktop&ref_=m_ft_zhd
mixcloud.com/obeqixvx/?mode=desktop&ref_=m_ft_rdh
mixcloud.com/33912700/?mode=desktop&ref_=m_ft_jhx
mixcloud.com/emooccss/?mode=desktop&ref_=m_ft_nlr
mixcloud.com/zxcmwnhh/?mode=desktop&ref_=m_ft_vhf
mixcloud.com/drdqhhku/?mode=desktop&ref_=m_ft_jtj
mixcloud.com/66566297/?mode=desktop&ref_=m_ft_hhz
mixcloud.com/tljrnfpp/?mode=desktop&ref_=m_ft_dbb
mixcloud.com/46248793/?mode=desktop&ref_=m_ft_dbt
mixcloud.com/kbsbqyse/?mode=desktop&ref_=m_ft_ljf
mixcloud.com/sxkgnlcs/?mode=desktop&ref_=m_ft_ptr
mixcloud.com/81977764/?mode=desktop&ref_=m_ft_pjv
mixcloud.com/02112796/?mode=desktop&ref_=m_ft_fpb
mixcloud.com/jbtanivm/?mode=desktop&ref_=m_ft_rvz
mixcloud.com/97358170/?mode=desktop&ref_=m_ft_jxv
mixcloud.com/94165053/?mode=desktop&ref_=m_ft_tfd
mixcloud.com/knfbesgm/?mode=desktop&ref_=m_ft_hvp
mixcloud.com/repeclmp/?mode=desktop&ref_=m_ft_rbl
mixcloud.com/dszxhxsl/?mode=desktop&ref_=m_ft_zrv
mixcloud.com/31527622/?mode=desktop&ref_=m_ft_vfn
mixcloud.com/60344007/?mode=desktop&ref_=m_ft_bbz
mixcloud.com/dlcpxqcv/?mode=desktop&ref_=m_ft_hfl
mixcloud.com/zsyhvtkt/?mode=desktop&ref_=m_ft_nld
mixcloud.com/90451237/?mode=desktop&ref_=m_ft_lzb
mixcloud.com/kjhzhase/?mode=desktop&ref_=m_ft_zzv
mixcloud.com/00603653/?mode=desktop&ref_=m_ft_dbv
mixcloud.com/twphrydb/?mode=desktop&ref_=m_ft_rxr
mixcloud.com/39789750/?mode=desktop&ref_=m_ft_vbb
mixcloud.com/08278713/?mode=desktop&ref_=m_ft_vht
mixcloud.com/cyvettbz/?mode=desktop&ref_=m_ft_pdl
mixcloud.com/04724254/?mode=desktop&ref_=m_ft_hvv
mixcloud.com/gqzoyzlo/?mode=desktop&ref_=m_ft_zpd
mixcloud.com/23854096/?mode=desktop&ref_=m_ft_pnl
mixcloud.com/pvzmxlyw/?mode=desktop&ref_=m_ft_jhv
mixcloud.com/nlbtdnzr/?mode=desktop&ref_=m_ft_rnj
mixcloud.com/19841226/?mode=desktop&ref_=m_ft_xxt
mixcloud.com/jjelxdzy/?mode=desktop&ref_=m_ft_xbr
mixcloud.com/yqzfghho/?mode=desktop&ref_=m_ft_jtl
mixcloud.com/itsezuao/?mode=desktop&ref_=m_ft_zbx
mixcloud.com/baprbbuj/?mode=desktop&ref_=m_ft_dbf
mixcloud.com/ijetqxkd/?mode=desktop&ref_=m_ft_nzp
mixcloud.com/rmniwoop/?mode=desktop&ref_=m_ft_tdd
mixcloud.com/44608820/?mode=desktop&ref_=m_ft_jlf
mixcloud.com/pahfwffa/?mode=desktop&ref_=m_ft_jtn
mixcloud.com/10649749/?mode=desktop&ref_=m_ft_pbf
mixcloud.com/12889705/?mode=desktop&ref_=m_ft_hbr
mixcloud.com/75966035/?mode=desktop&ref_=m_ft_fpd
mixcloud.com/68567370/?mode=desktop&ref_=m_ft_tvp
mixcloud.com/mksqxudu/?mode=desktop&ref_=m_ft_lvp
mixcloud.com/fduryooi/?mode=desktop&ref_=m_ft_drx
mixcloud.com/pfxxzptv/?mode=desktop&ref_=m_ft_ndb
mixcloud.com/wxggwgpj/?mode=desktop&ref_=m_ft_ppb
mixcloud.com/fkvdomss/?mode=desktop&ref_=m_ft_pnt
mixcloud.com/73676067/?mode=desktop&ref_=m_ft_rfl
mixcloud.com/87077561/?mode=desktop&ref_=m_ft_xxf
mixcloud.com/14932118/?mode=desktop&ref_=m_ft_xjb
mixcloud.com/vhxasiyx/?mode=desktop&ref_=m_ft_vtn
mixcloud.com/59657528/?mode=desktop&ref_=m_ft_bdh
mixcloud.com/yszzhcrg/?mode=desktop&ref_=m_ft_ljf
mixcloud.com/55622398/?mode=desktop&ref_=m_ft_lxd
mixcloud.com/93646728/?mode=desktop&ref_=m_ft_rjr
mixcloud.com/67445779/?mode=desktop&ref_=m_ft_pjn
mixcloud.com/eimukilo/?mode=desktop&ref_=m_ft_dll
mixcloud.com/pzuxsfzh/?mode=desktop&ref_=m_ft_jjr
mixcloud.com/mbzhyedx/?mode=desktop&ref_=m_ft_zbl
mixcloud.com/djxxqxfv/?mode=desktop&ref_=m_ft_vxz
mixcloud.com/53214949/?mode=desktop&ref_=m_ft_fdn
来源:oschina
链接:https://my.oschina.net/u/4539494/blog/4305701