rename Key to CtxKey

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2019-09-11 10:05:03 +05:30
committed by mergify[bot]
parent 41b701c98c
commit ed9330d2f6
2 changed files with 4 additions and 4 deletions

View File

@ -20,12 +20,12 @@ import (
type contextKey string
// Key for context based logging
var Key = contextKey("ID")
// CtxKey for context based logging
var CtxKey = contextKey("ID")
// Log helps in context based logging
func Log(ctx context.Context, format string) string {
id := ctx.Value(Key)
id := ctx.Value(CtxKey)
if id == nil {
return format
}