context in golang

Kiyor | Created: 01-20-17 18:39:36, Last Update: 01-24-17 10:48:12



# set value
child_ctx = context.WithValue(parent_ctx, key, value)

# get value
value = ctx.Value(key)

# key and value are interface


Category: none

Tags: context golang