Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cleanup ¶
func Cleanup()
Cleanup removes all data associated with this goroutine. If this is not called, the data may persist for the lifetime of your application. This must be called from the very first goroutine to invoke Set
func Get ¶
func Get(key string) interface{}
Get gets the value by key as it exists for the current goroutine.
func Go ¶
func Go(f func())
Go creates a new goroutine and runs the provided function in that new goroutine. It also associates any key,value pairs stored for the parent goroutine with the child goroutine. This function must be used if you wish to preserve the reference to any data stored in gls. This function automatically cleans up after itself. Do not call cleanup in the function passed to this function.