GoRoutine Local Storage using GoRoutine IDs
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
gls.go Initial code commit Mar 23, 2015
gotrack.go rsc.io/grind . Mar 30, 2015


gls GoDoc Build Status Coverage Status

GoRoutine local storage using GoRoutine IDs

This package is heavily inspired by jtolds' gls package.

I made my own version of jtolds' package because Brad Fitzpatrick created a function to get the current GoRoutine ID. Am I a horrible person for using this function? Probably.

Why is this useful?

So far, the only thing I'm using it for is storing a unique identifier for a given HTTP request so I can track its progress through my code via logging. I felt this approach was easier and less messy than refactoring every function to take some kind of context or identifier.