Along with propagating deadlines and cancellation signals, Go’s context package can also
carry request-scoped values across API boundaries and processes.
There are only two public API constructs associated with context values:
func WithValue(parent Context, key, val any) Context
func (c Context) Value(key any) any
WithValue can take any comparable value as both the key and the value. The key defines how
the stored value is identified, and the value can be any data you want to pass through the
call chain.