From b6aabfb7c469299cd7e95b5581059f48d39b6121 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 19 Apr 2026 09:56:50 +0800 Subject: [PATCH] fix: remove unused function ParseNetReg --- server/utils/utils.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/server/utils/utils.go b/server/utils/utils.go index 5ce187336..5bd0cfb65 100644 --- a/server/utils/utils.go +++ b/server/utils/utils.go @@ -28,7 +28,6 @@ import ( "golang.org/x/text/transform" "github.com/google/uuid" - errors2 "github.com/pkg/errors" "golang.org/x/crypto/pbkdf2" ) @@ -195,19 +194,6 @@ func StringToInt(in string) (out int) { return } -func ParseNetReg(line string, reg *regexp.Regexp, shouldLen, index int) (int64, string, error) { - rx1 := reg.FindStringSubmatch(line) - if len(rx1) != shouldLen { - return 0, "", errors.New("find string length error") - } - i64, err := strconv.ParseInt(rx1[index], 10, 64) - total := rx1[2] - if err != nil { - return 0, "", errors2.Wrap(err, "ParseInt error") - } - return i64, total, nil -} - func PKCS5Padding(ciphertext []byte, blockSize int) []byte { padding := blockSize - len(ciphertext)%blockSize padText := bytes.Repeat([]byte{byte(padding)}, padding)