Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreamsxin/gin-demo
https://github.com/dreamsxin/gin-demo
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dreamsxin/gin-demo
- Owner: dreamsxin
- License: other
- Created: 2024-04-28T08:44:42.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-29T01:15:17.000Z (9 months ago)
- Last Synced: 2024-10-30T03:48:59.455Z (2 months ago)
- Language: Go
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## cobra cli
### 初始化
```shell
cobra-cli init --viper --author "[email protected]" --license "Apache-2.0"
```### 创建 init 命令
```shell
cobra-cli add serve
```## GORM
```shell
go install gorm.io/gen/tools/gentool@latest
```### 从数据库生成代码
```shell
gentool -dsn "root:123456@tcp(localhost:3306)/hello?charset=utf8mb4&parseTime=True&loc=Local" -tables "user" -outPath "./modules/hello/query" -outFile "query.go" -onlyModel -modelPkgName "models"
```