- 目录结构 main/main.go
// @title Restful API demo
// @version 1.1
// @description 实践Restful API
// @contact.name richard
// @contact.email cugriver@163.com
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @host localhost:8080
// @BasePath /
// @schemes http https
- API 函数
// @Summary Show a account
// @Description get string by ID
// @Produce json
// @Param id path int true "Account ID"
// @Success 200 {object} api.Account
// @Header 200 {string} Token "qwerty"
// @Failure 400 {object} httputil.HTTPError
// @Failure 401 {object} httputil.HTTPError
// @Failure 500 {object} httputil.HTTPError
// @Router /accounts/{id} [get]
- git submodule update --init --recursive