mirror of
https://gitee.com/johng/gf
synced 2026-07-04 21:03:13 +08:00
a6485d53af1637db08180383f9da9e2b310811a8
This pull request refactors the way Go files are formatted after project generation in the `geninit` package. The main change is replacing the previous formatting utility with a new function that uses the standard library's `go/format` package, ensuring that only code formatting is applied and import paths are not inadvertently modified. **Formatting improvements:** * Replaced the use of `utils.GoFmt` with a new `formatGoFiles` function that utilizes `go/format` for formatting Go files, avoiding unwanted changes to local import paths. (`cmd/gf/internal/cmd/geninit/geninit_generator.go`) * Added the `formatGoFiles` function, which recursively formats all Go files in a directory using `go/format` and logs any formatting errors. (`cmd/gf/internal/cmd/geninit/geninit_generator.go`) * Updated comments and references in the code to clarify that formatting is now handled by `formatGoFiles` instead of `utils.GoFmt`. (`cmd/gf/internal/cmd/geninit/geninit_ast.go`) **Dependency changes:** * Removed the import of the custom `utils` package and added the standard `go/format` package to support the new formatting approach. (`cmd/gf/internal/cmd/geninit/geninit_generator.go`)
fix(contrib/drivers): resolve field duplication issue when same table/column names exist across different MySQL/MariaDB databases (#4577)
fix(contrib/drivers): resolve field duplication issue when same table/column names exist across different MySQL/MariaDB databases (#4577)
refract(gerror): add ITextArgs interface and its implements, mainly for i18n that needs text and args separately (#4597)
fix(contrib/drivers): resolve field duplication issue when same table/column names exist across different MySQL/MariaDB databases (#4577)
English | 简体中文
A powerful framework for faster, easier, and more efficient project development.
Installation
go get -u github.com/gogf/gf/v2
Documentation
- Official Site: https://goframe.org
- Official Site(en): https://goframe.org/en
- 国内镜像: https://goframe.org.cn
- Mirror Site: Github Pages
- Mirror Site: Offline Docs
- GoDoc API: https://pkg.go.dev/github.com/gogf/gf/v2
- Doc Source: https://github.com/gogf/gf-site
Contributors
💖 Thanks to all the contributors who made GoFrame possible 💖
License
GoFrame is licensed under the MIT License, 100% free and open-source, forever.
Languages
GO
100%
