1
0
mirror of https://github.com/beego/bee.git synced 2024-10-31 18:50:54 +00:00

修改函数注释,以符合Lint规范

This commit is contained in:
ZetaChow 2016-09-09 15:20:59 +08:00
parent 6f5df78d45
commit ad34b7be2a
2 changed files with 21 additions and 3 deletions

View File

@ -1168,11 +1168,12 @@ import (
"github.com/astaxie/beego"
)
// oprations for {{ctrlName}}
// {{ctrlName}}Controller oprations for {{ctrlName}}
type {{ctrlName}}Controller struct {
beego.Controller
}
// URLMapping ...
func (c *{{ctrlName}}Controller) URLMapping() {
c.Mapping("Post", c.Post)
c.Mapping("GetOne", c.GetOne)
@ -1181,6 +1182,7 @@ func (c *{{ctrlName}}Controller) URLMapping() {
c.Mapping("Delete", c.Delete)
}
// Post ...
// @Title Post
// @Description create {{ctrlName}}
// @Param body body models.{{ctrlName}} true "body for {{ctrlName}} content"
@ -1202,6 +1204,7 @@ func (c *{{ctrlName}}Controller) Post() {
c.ServeJSON()
}
// Get ...
// @Title Get
// @Description get {{ctrlName}} by id
// @Param id path string true "The key for staticblock"
@ -1220,6 +1223,7 @@ func (c *{{ctrlName}}Controller) GetOne() {
c.ServeJSON()
}
// GetAll ...
// @Title Get All
// @Description get {{ctrlName}}
// @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..."
@ -1282,6 +1286,7 @@ func (c *{{ctrlName}}Controller) GetAll() {
c.ServeJSON()
}
// Update ...
// @Title Update
// @Description update the {{ctrlName}}
// @Param id path string true "The id you want to update"
@ -1305,6 +1310,7 @@ func (c *{{ctrlName}}Controller) Put() {
c.ServeJSON()
}
// Delete ...
// @Title Delete
// @Description delete the {{ctrlName}}
// @Param id path string true "The id you want to delete"

View File

@ -82,11 +82,12 @@ import (
"github.com/astaxie/beego"
)
// operations for {{controllerName}}
// {{controllerName}}Controller operations for {{controllerName}}
type {{controllerName}}Controller struct {
beego.Controller
}
// URLMapping ...
func (c *{{controllerName}}Controller) URLMapping() {
c.Mapping("Post", c.Post)
c.Mapping("GetOne", c.GetOne)
@ -95,6 +96,7 @@ func (c *{{controllerName}}Controller) URLMapping() {
c.Mapping("Delete", c.Delete)
}
// Post ...
// @Title Create
// @Description create {{controllerName}}
// @Param body body models.{{controllerName}} true "body for {{controllerName}} content"
@ -105,6 +107,7 @@ func (c *{{controllerName}}Controller) Post() {
}
// GetOne ...
// @Title GetOne
// @Description get {{controllerName}} by id
// @Param id path string true "The key for staticblock"
@ -115,6 +118,7 @@ func (c *{{controllerName}}Controller) GetOne() {
}
// GetAll ...
// @Title GetAll
// @Description get {{controllerName}}
// @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..."
@ -130,6 +134,7 @@ func (c *{{controllerName}}Controller) GetAll() {
}
// Update ...
// @Title Update
// @Description update the {{controllerName}}
// @Param id path string true "The id you want to update"
@ -141,6 +146,7 @@ func (c *{{controllerName}}Controller) Put() {
}
// Delete ...
// @Title Delete
// @Description delete the {{controllerName}}
// @Param id path string true "The id you want to delete"
@ -164,11 +170,12 @@ import (
"github.com/astaxie/beego"
)
// oprations for {{controllerName}}
// {{controllerName}}Controller oprations for {{controllerName}}
type {{controllerName}}Controller struct {
beego.Controller
}
// URLMapping ...
func (c *{{controllerName}}Controller) URLMapping() {
c.Mapping("Post", c.Post)
c.Mapping("GetOne", c.GetOne)
@ -177,6 +184,7 @@ func (c *{{controllerName}}Controller) URLMapping() {
c.Mapping("Delete", c.Delete)
}
// Post ...
// @Title Post
// @Description create {{controllerName}}
// @Param body body models.{{controllerName}} true "body for {{controllerName}} content"
@ -195,6 +203,7 @@ func (c *{{controllerName}}Controller) Post() {
c.ServeJSON()
}
// Get ...
// @Title Get
// @Description get {{controllerName}} by id
// @Param id path string true "The key for staticblock"
@ -213,6 +222,7 @@ func (c *{{controllerName}}Controller) GetOne() {
c.ServeJSON()
}
// GetAll ...
// @Title Get All
// @Description get {{controllerName}}
// @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..."
@ -275,6 +285,7 @@ func (c *{{controllerName}}Controller) GetAll() {
c.ServeJSON()
}
// Update ...
// @Title Update
// @Description update the {{controllerName}}
// @Param id path string true "The id you want to update"
@ -295,6 +306,7 @@ func (c *{{controllerName}}Controller) Put() {
c.ServeJSON()
}
// Delete ...
// @Title Delete
// @Description delete the {{controllerName}}
// @Param id path string true "The id you want to delete"