A tool that automatically generates Go structs and GORM-compatible code from MySQL, SQLite, and MSSQL databases.
Gormt is a Go-based tool that automatically generates Go structs and GORM-compatible code from existing MySQL, SQLite, and MSSQL databases. It solves the problem of manually writing repetitive model definitions by converting database schemas into ready-to-use Go code with proper tags and relationships.
Go developers using the GORM ORM who need to generate model structs from existing databases, particularly those working with MySQL, SQLite, or MSSQL and wanting to automate boilerplate code creation.
Developers choose Gormt for its tight integration with GORM, support for complex database relationships, and ability to generate both structs and helper functions, significantly speeding up initial project setup and database migrations.
database to golang struct
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Converts database tables into Go structs with correct field types, GORM tags, and JSON tags, eliminating manual boilerplate coding for model definitions.
Includes support for primary keys, indexes, foreign keys, and unique constraints via GORM tags, and generates helper functions for CRUD operations and relationship fetching.
Allows customization through YAML config files or command-line flags for output directory, table prefixes, data type mappings, and more, adapting to various project needs.
Offers both a GUI for visual interaction and a CLI for scriptable automation, catering to different developer preferences and workflows.
Only supports MySQL, SQLite, and MSSQL, missing popular databases like PostgreSQL, which restricts its use in diverse tech stacks.
With numerous options in config.yml, such as self_type_define and various toggles, initial setup can be overwhelming and prone to errors for new users.
The README notes UTF-8 encoding issues in Windows requiring manual fixes (e.g., 'CHCP 65001'), adding overhead for cross-platform development teams.