From afd805c7ba92aa039e0cdd1affb516149779b740 Mon Sep 17 00:00:00 2001 From: vcptr <51714622+vcptr@users.noreply.github.com> Date: Tue, 26 Nov 2019 13:30:44 +0800 Subject: [PATCH] fix session key unexported --- common/session/context.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/session/context.go b/common/session/context.go index 2e69ae00c..a836bc6b2 100644 --- a/common/session/context.go +++ b/common/session/context.go @@ -9,7 +9,7 @@ const ( inboundSessionKey outboundSessionKey contentSessionKey - MuxPreferedSessionKey + muxPreferedSessionKey ) // ContextWithID returns a new context with the given ID. @@ -60,12 +60,12 @@ func ContentFromContext(ctx context.Context) *Content { // ContextWithMuxPrefered returns a new context with the given bool func ContextWithMuxPrefered(ctx context.Context, forced bool) context.Context { - return context.WithValue(ctx, MuxPreferedSessionKey, forced) + return context.WithValue(ctx, muxPreferedSessionKey, forced) } // MuxPreferedFromContext returns value in this context, or false if not contained. func MuxPreferedFromContext(ctx context.Context) bool { - if val, ok := ctx.Value(MuxPreferedSessionKey).(bool); ok { + if val, ok := ctx.Value(muxPreferedSessionKey).(bool); ok { return val } return false