diff --git a/.travis.yml b/.travis.yml index 4cfe98c..d021e01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,12 @@ os: language: go go: - - 1.11.x + - 1.15.x env: global: - GOTFLAGS="-race" matrix: - - BUILD_DEPTYPE=gx - BUILD_DEPTYPE=gomod diff --git a/context.go b/context.go index 8796b8b..eaed01d 100644 --- a/context.go +++ b/context.go @@ -2,7 +2,9 @@ package metrics import "context" -const CtxScopeKey = "ipfs.metrics.scope" +type ctxScopeKey struct{} + +var CtxScopeKey = ctxScopeKey{} func CtxGetScope(ctx context.Context) string { s := ctx.Value(CtxScopeKey)