mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-14 08:52:47 +03:00
14 lines
327 B
Go
14 lines
327 B
Go
package urltest
|
|
|
|
import "context"
|
|
|
|
type contextKeyIsUnifiedDelay struct{}
|
|
|
|
func ContextWithIsUnifiedDelay(ctx context.Context) context.Context {
|
|
return context.WithValue(ctx, contextKeyIsUnifiedDelay{}, true)
|
|
}
|
|
|
|
func IsUnifiedDelayFromContext(ctx context.Context) bool {
|
|
return ctx.Value(contextKeyIsUnifiedDelay{}) != nil
|
|
}
|