diff options
| author | 2026-02-16 16:31:54 -0500 | |
|---|---|---|
| committer | 2026-02-16 16:31:54 -0500 | |
| commit | ca90ebdfa8789654766c5d7969baa7afacd9ebd2 (patch) | |
| tree | 9693e0c7a5af6713f4c5e39372dcf22d05844ec3 /common/context/option.go | |
Diffstat (limited to '')
| -rw-r--r-- | common/context/option.go | 27 |
1 files changed, 27 insertions, 0 deletions
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 + } +} |
