```
//@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"
```
有疑问加站长微信联系(非本文作者)