fix: remove unused function ParseNetReg
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user