logo

Fixing Golang GIN-debug WARNING Headers were already written.

/ Software Development / Golang

If you’re just getting your hands dirty with Golang, and specifically with Gin, which is a web development framework, you might come across this specific warning: [GIN-debug] [WARNING] Headers were already written. Wanted to override status code 400 with 200 Most likely, you’re trying to use BindJSON on a property that does not exist. Here’s an example. I’m building an analytics solution for weremote.eu and for its pageview counter, I wanted to also be able to pass in extra props besides the usual props such an event would carry.

Read more →
Copyright (c) 2023 Adrian Oprea. All rights reserved.