Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jun 24 14:29
    Coverage (master) +0.00%
  • Jun 24 14:26
    Coverage (master) +0.00%
  • Jun 24 14:26
    Coverage (master) +0.00%
  • Jun 24 14:25
    Coverage (master) +0.00%
  • Jun 24 14:25
    Coverage (master) +0.00%
  • Jun 24 14:25
    Coverage (master) +0.00%
  • Jun 24 14:24
    Coverage (master) +0.00%
  • Jun 24 14:08
    Coverage (master) +0.00%
  • Jun 24 14:08
    Coverage (master) +0.00%
  • Jun 24 14:07
    Coverage (#138) +0.00%
  • Jun 24 14:06

    thinkerou on master

    chore(deps): bump github.com/st… (compare)

  • Jun 24 14:06

    dependabot[bot] on go_modules


  • Jun 24 14:06
    Coverage (#3207) +0.00%
  • Jun 24 14:06
    thinkerou closed #3207
  • Jun 24 14:06
    thinkerou review_requested #3207
  • Jun 24 09:33
    codecov[bot] commented #3202
  • Jun 24 09:33
    Coverage (#3202) -0.25%
  • Jun 24 09:33
    mygityf synchronize #3202
  • Jun 24 08:16
    codecov[bot] commented #3202
  • Jun 24 08:16
    Coverage (#3202) -0.25%
Raphaël Yancey
Nikolay Kiselev
Hi, are there any updates on new logo proposal gin-gonic/logo#6? This logo variant has more than 400 upvotes on reddit
Fabrizio Sestito
Hi everyone, I'm struggling with gin not overriding a status code with a 500 if the error is caused from a method called in a template
Narsimham Chelluri
Hello, I have a question about data binding. Is it possible to normalize the data that comes out of the Bind functions? E.g. uppercase it, massage it, etc.

Go Gin reCAPTCHA Example (v2 & v3)


the forum is dead?
Pooja Yadav
Hi everyone, Pooja here. I work as a Senior Marketing Coordinator at Packt. Looking at all the talk around Gin has encouraged me to share that Packt recently released a book on the framework. Building Distributed Applications in Gin: https://packt.link/niS8s by Mohamed Labouardy, do check the book and you can approach me if you'll like to have a free digital copy.
@PoojaYa01281608_twitter I did like to have a free digital copy.
Pooja Yadav
Sure, let's discuss in private.
Juan Pablo Tosso
Hey guys, I just integrated coraza-waf (A web application firewall) with Gin, I'm not a gin user so it's hard for me to write tests. I hope someone can check my project :) https://github.com/jptosso/coraza-gin
Yordis Prieto

Hey folks, I am fairly new into Go, and Gin. I am trying to figure out how to do the following

// I need to do this
if validate, ok := binding.Validator.Engine().(*validator.Validate); ok {

But I would like to do it at the router level

router := gin.New()
// can I do the binding validator thingy using `router` somehow?
Basically, how to remove that binding.Validator singleton setup
Jeroen Bulters
Hi all! Looking for a way to use ShouldBind with embedded structs. Basically trying to bind a form posted field "Config.Name" to the Name field in the embedded Config struct.
Any "prior art"? ;-)
anyone there?
i cant clone
go get -u github.com/gin-gonic/gin
# cd .; git clone -- https://gopkg.in/yaml.v2 /Users/jt/golib/src/gopkg.in/yaml.v2
Cloning into '/Users/jt/golib/src/gopkg.in/yaml.v2'...
fatal: unable to access 'https://gopkg.in/yaml.v2/': SSL certificate problem: certificate has expired
package gopkg.in/yaml.v2: exit status 128
Hello devs! I would like to you to help me out with your opinions. Me & my team have a interesting social networking project on the table. We would like to build it using Go lang. How much do you recommend Gin Gonic for such a project? I'm just doing research on the best possible Go lang frameworks.
2 replies
How can I make a middleware that modifies after next call the headers like?
func ResponseTimeMiddleware(c *gin.Context) {
    startTime := GetUnixTime()
    c.Request.Header.Add("x-response-time", strconv.FormatInt(GetUnixTime()-startTime, 10))
I might be an idiot.
But running go get github.com/gin-contrib/sessions is returning ../../go/pkg/mod/github.com/gin-contrib/sessions@v0.0.4/session_options_go1.10.go:1:1: expected 'package', found 'EOF'
Any ideas?
Danny Lai


I am writing a simple API with gin. routes / request / response all good. Now, i am trying to add some debugs into the route. I know i can log.Print() the messages, but with that, i will not have the context (request id, request body / method etc). I tried looking up a logger middleware that can accept any debug message (log.Print("Working on request" + param.Request.Body)).. but i can't seem to find any. All that said, question: How i can print debug message within a route, such that it has the context, and any debug messages i left in the route? Any example would be great!


Youwei Li
Hi , I'm new to learn and use Gin, could someone tell me how Gin handles high concurrency, by creating a new gouroutine when processing a new requests?
Stanislav Ochotnický
I think I found a bug/weird behaviour wrt caching and StaticFS when using embed - as far as I can tell due to way embed doesn't really provide modified time of files. I wonder if anyone can confirm or I am just confused :-)
Stanislav Ochotnický
re staticFS & embed caching mentioned yesterday - I did end up finding a golang bug that basically addresses that - golang/go#44854
Giovanni Almeida
Hello! How can I contact any repository owner?
Danny Hermes
Is there any way to get code review on gin-gonic/gin#3054 ?
Dikdik Tasdik Laksana
Abdul Saqib
Could anyone please help me to get this point?
What is the use of this package: ginS
How can I get body of post request in JSON?
@SolindekDev use c.BindJSON func to bind to request struct
Kamis bin Bintang
Hello! Excellent Developers! I've just experienced with Gin-Gonic framework. I'm now looking for projects for hands-on practice. Please contact me and give me projects if you have any.
WERCK Ayrton
Hi !
I am looking to use gin to build our next restful API, however our company enforce media type versioning and I did not find a way to route request based on header content without changing the URL
Do you if that's something possible?
this is good
Hi all, I have a function (gin is used) that is talking to the database in the code, and based on the response the logic is written, how to write a unit tests using the testing package without changing the original function?
code in the playground: https://go.dev/play/p/1LpWRtDBatF
how do I create a mock context with all the headers, body, URL, and other details which I am sending from the client, I am stuck here, and also the function is not returning anything so, how do I mock the DB and make it work, how do I write a test which covers 80% code, can you pls suggest
hi, guys. What will happend if the groutine happened oom. Will the main progress will keep running, and the defer function will be executed in the oom's grotine?
Thomas Güttler
Oom kills the process with signal 9. The process can't catch the signal. The whole process gets killed.
Muktar Iberahim
hello i just installed gin to my go app and it give me this ../../go/pkg/mod/github.com/gin-contrib/sse@v0.1.0/sse-decoder.go:1:1: expected 'package', found 'EOF'
../../go/pkg/mod/github.com/go-playground/universal-translator@v0.18.0/benchmarks_test.go:1:1: expected 'package', found 'EOF'
../../go/pkg/mod/github.com/ugorji/go/codec@v1.2.7/0_importpath.go:1:1: expected 'package', found 'EOF'
../../go/pkg/mod/google.golang.org/protobuf@v1.28.0/proto/bench_test.go:1:1: expected 'package', found 'EOF'
../../go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/apic.go:1:1: expected 'package', found 'EOF'