```
//@Summary get user by user_id
//@Param id path int false
//@Router /api/v1/user/{id} [get]
func (u User)Get(c *gin.Context){}
```
swag 初始化时报错 ,但是我看`Go 语言编程之旅` 入参也只有`*gin.Context`,不知道它怎么成功初始化的
https://golang2.eddycjy.com/posts/ch2/04-api-doc/
```
*******>swag init
2021/03/29 10:21:00 Generate swagger docs....
2021/03/29 10:21:00 Generate general API Info, search dir:./
2021/03/29 10:21:00 ParseComment error in file internal\model\user.go :missing required param comment parameters "id path int false"
```
需要添加comment,即字段描述 //@Param id path int false "ID描述" swagger它的参数语法: @Param [param name] [paramType] [data type] [is required?] [comment]
#1