An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# Gee Application

Build Status
codecov
Go Report Card
<br />
GoDoc

具有完善的单元测试方案,支持数据库、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` 文件