skip to Main Content

Golang gin receive json data and image

I have this code for request handler: func (h *Handlers) UpdateProfile() gin.HandlerFunc { type request struct { Username string `json:"username" binding:"required,min=4,max=20"` Description string `json:"description" binding:"required,max=100"` } return func(c *gin.Context) { var updateRequest request if err := c.BindJSON(&updateRequest); err != nil…

VIEW QUESTION
Back To Top
Search