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)