需要导入swag init
命令生成的docs包
import _ module_name/docs
Param Type: formData
Data Type: file
// UpdateProfile godoc
// @Summary UpdateProfile updates user info
// @Description check username and token, then update user profile
// @Accept multipart/form-data
// @Produce json
// @param username path string true "username"
// @param token formData string true "token"
// @param nickname formData string false "nickname"
// @param image formData file false "image"
// @Success 200 {object} map[string]interface{}
// @Router /update/{username} [POST]