1024programmer Java Generate CRUD production code for each mysql table golang

Generate CRUD production code for each mysql table golang

When writing golang to connect to mysql operations, you cannot escape CURD (add, delete, modify, check) operations.

If you use ORM operations in production, it will affect performance. Only native SQL operations can be used Best.

If there are a lot of tables and a lot of duplicate codes, it would be great if there was a tool to generate CURD codes!

Create a mysql code by yourself Tool. Name: go-mygen

Main implementation

  1. Generate add, delete, modify and query code for each table
  2. Generate (optional) Markdown of all tables
  3. Generate the structure of the table, you can customize the structure to parse entities, such as json, gorm, xml


go get -u -v github.com/yezihack/go-mygen/...

Full source code

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/734669

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us


Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top