From e8f213fdedc75ba0d2587789fcada599dd9846ac Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 11 Apr 2024 23:40:25 +0100 Subject: [PATCH] easier to read? --- pkg/udpproxy/validator.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/udpproxy/validator.go b/pkg/udpproxy/validator.go index 7de788e..12eb5c9 100644 --- a/pkg/udpproxy/validator.go +++ b/pkg/udpproxy/validator.go @@ -13,7 +13,7 @@ type validator struct { } func newValidator() validator { - return validator{ + v := validator{ rconRequestHeader: []byte("\xff\xff\xff\xffrcon"), getstatusRequestHeader: []byte("\xff\xff\xff\xffgetstatus"), getinfoRequestHeader: []byte("\xff\xff\xff\xffgetinfo"), @@ -22,6 +22,7 @@ func newValidator() validator { getinfoResponseHeader: []byte("\xff\xff\xff\xffinfoResponse\n"), badRconIdentifier: []byte("Bad rcon"), } + return v } func (v *validator) isRconRequestPacket(buf []byte) bool {