1
0
Fork 0
forked from forgejo/forgejo

Replace util.SliceXxx with slices.Xxx (#26958)

This commit is contained in:
CaiCandong 2023-09-07 17:37:47 +08:00 committed by GitHub
parent e97e883ad5
commit a78c2eae24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 46 additions and 110 deletions

View file

@ -16,6 +16,7 @@ import (
"net/http"
"path"
"regexp"
"slices"
"strconv"
"strings"
"time"
@ -265,7 +266,7 @@ func verifyDataOld(signature, data []byte, pub *rsa.PublicKey) error {
}
}
if !util.SliceEqual(out[skip:], data) {
if !slices.Equal(out[skip:], data) {
return fmt.Errorf("could not verify signature")
}