https://github.com/goapt/gee-app
A golang application with complete unit testing
https://github.com/goapt/gee-app
gee golang unit-testing
Last synced: about 2 months ago
JSON representation
A golang application with complete unit testing
- Host: GitHub
- URL: https://github.com/goapt/gee-app
- Owner: goapt
- License: mit
- Created: 2019-10-11T02:48:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-27T14:21:57.000Z (almost 2 years ago)
- Last Synced: 2023-07-27T15:32:36.321Z (almost 2 years ago)
- Topics: gee, golang, unit-testing
- Language: Go
- Homepage:
- Size: 813 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gee Application
具有完善的单元测试方案,支持数据库、Redis的单元测试,支持Mock HTTP Request
## 使用方法
1. `git clone https://github.com/goapt/gee-app.git app`
2. `go mod tidy`
3. 修改 `config.toml` 配置信息,如 `app_name` `storage_path` 等
4. `make` 编译## Http Server
如果项目是一个http的接口项目,路由在`router`包中管理,`handler` 写到 `handler` 包,使用如下命令行启动```
./app http --addr=:8081
```## Cli Server
如果项目是一个cli的命令行程序,命令行程序写在 `cmd` 包中,运行时指定subcommand名称,如
```
./app test --id=4
```## 编译运行
```
make
./app subcommend
```## 版本信息
```
./app -v
```## HTTP调试
详见 `app/app.http` 文件