From 60956e01577763b03b12bb53c07702f815bbc547 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 3 Oct 2022 18:39:39 +0800 Subject: [PATCH] bbgo: add NewContextWithDefaultIsolation --- pkg/bbgo/isolation.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/bbgo/isolation.go b/pkg/bbgo/isolation.go index 8d1f50f48..19cc215c3 100644 --- a/pkg/bbgo/isolation.go +++ b/pkg/bbgo/isolation.go @@ -28,3 +28,7 @@ func NewIsolationFromContext(ctx context.Context) *Isolation { func NewContextWithIsolation(parent context.Context, isolation *Isolation) context.Context { return context.WithValue(parent, IsolationContextKey, isolation) } + +func NewContextWithDefaultIsolation(parent context.Context) context.Context { + return context.WithValue(parent, IsolationContextKey, defaultIsolation) +}