Controlling Log output coloring Controlling Log output coloring By default, logs output on console should be colorized depending on the detected TTY. Never colorize logs: fun...
Using BasicAuth middleware Using BasicAuth middleware // simulate some private data var secrets = gin . H { "foo" : gin . H { "email" : "foo@bar.com" , "pho...
Support Let’s Encrypt Support Let’s Encrypt example for 1-line LetsEncrypt HTTPS servers. package main import ( "log" "github.com/gin-gonic/autotls" ...
Creating a New Electron Browser Module Add your files to Electron’s project configuration Create API documentation Set up ObjectTemplateBuilder and Wrappable Link your Electro...
XML, JSON and YAML rendering SecureJSON JSONP AsciiJSON XML, JSON and YAML rendering func main () { r := gin . Default () // gin.H is a shortcut for map[s...
Redirects Redirects Issuing a HTTP redirect is easy. Both internal and external locations are supported. r . GET ( "/test" , func ( c * gin . Context ) { c . Redirec...