Top "Go-gin" questions

Gin is a HTTP web framework written in Go.

How to get all query parameters from go *gin.context object

I am looking at https://godoc.org/github.com/gin-gonic/gin documentation for a method which returns list of all …

go go-gin
How to use Context.Request.Body and retain it?

I am trying to write a middleware where I will be doing a json schema validation against the request body. …

go go-gin
Go gin framework CORS

I'm using Go gin framework gin func CORSMiddleware() gin.HandlerFunc { return func(c *gin.Context) { c.Writer.Header().Set("Content-Type", "…

go frameworks cors preflight go-gin
How to pass arguments to router handlers in Golang using Gin web framework?

I'm using Gin, https://gin-gonic.github.io/gin/, to build a simple RESTful JSON API with Golang. The routes are …

go go-gin
How to log response body in gin

I need to log the response body in a middleware of gin, but I don't find how to get the …

go go-gin
JSON response in Golang’s GIN returning as scrambled data

I have array of a struct being created from data I collected from the database. For simplicity, lets say this …

json go go-gin
Make mock gin.Context in Golang

I'm writing a REST API using Gin framework. But I was faced a trouble testing my controllers and researching TDD …

unit-testing go testing mocking go-gin
Go Gin-Gonic, get text from POST request

I'm starting to develop a REST API using Go and package Gin-Gonic. The idea is to create a REST API …

rest go go-gin
How to set gin mode to release mode?

I need to set gin mode to release mode. How should I do it? Now when I run my API …

go go-gin
Setting up Route Not Found in Gin

I've setup a default router and some routes in Gin: router := gin.Default() router.POST("/users", save) router.GET("/users",…

go go-gin