This has caught me out before, so this is as much for me as it is for you! Scenario 1 - editor and gocode out-of-sync If you write your Go code using a text editor which takes its Go auto-completion from gocode (it will), it may get out-of-sync with your editor every now and then, if your top-level Go package goplus for Atom or vscode-go for VSCode etc. doesn’t update it for you.
The appleboy gin-jwt JWT middleware for Gin allows you to plug JWT into your Gin router with little to no fuss. Recently, I’ve used it to store basic user information to allow my router code to intelligently handle different user roles etc. Step 1 - Grab Gin and gin-jwt $ go get github.com/gin-gonic/gin $ go get gopkg.in/appleboy/gin-jwt.v2 Step 2 - Write some code Rather than stepping through line-by-line, I’ll describe what we’re doing using in-line comments (in a format you can just copy and paste into your own editor to play around with).
The rake build automation tool is a Ruby implementation of the make tool, which has been around since ever. I tried it out for the first time as part of a Go application I’m currently pushing into Production and found it a joy to work with. So much so, that I’ve taken to creating a Rakefile for projects that aren’t destined for deployment, as a wrapper for repetitive tasks like go build -o thing.