DEV Community

Discussion on: A deep dive into Go's Context Package

Collapse
 
ghvstcode profile image
Oluwatobi

Hello Ron!
I am glad you enjoyed this post.

I do not have a definite answer to your question, But you stated all the data are related to a specific request . creating a global context object might work fine! one of the reasons I advised not to use the withValue function as a parameter is that you loose typesafety at compile time since context values are basically stored as type interface{}! I hope this helps, You could check out this article for more about context peter.bourgon.org/blog/2016/07/11/...