From ca90ebdfa8789654766c5d7969baa7afacd9ebd2 Mon Sep 17 00:00:00 2001 From: BanceDev Date: Mon, 16 Feb 2026 16:31:54 -0500 Subject: initial commit --- common/context/option.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 common/context/option.go (limited to 'common/context/option.go') diff --git a/common/context/option.go b/common/context/option.go new file mode 100644 index 0000000..7c40cd4 --- /dev/null +++ b/common/context/option.go @@ -0,0 +1,27 @@ +package context + +type Option func(*Context) + +func WithIsDem(isDem bool) Option { + return func(ctx *Context) { + ctx.isDem = isDem + } +} + +func WithIsQWD(isQWD bool) Option { + return func(ctx *Context) { + ctx.isQWD = isQWD + } +} + +func WithIsMVD(isMVD bool) Option { + return func(ctx *Context) { + ctx.isMVD = isMVD + } +} + +func WithProtocolVersion(protocolVersion uint32) Option { + return func(ctx *Context) { + ctx.protocolVersion = protocolVersion + } +} -- cgit v1.2.3-59-g8ed1b