fix revive reported issues

This commit is contained in:
cubicroot 2024-10-20 20:26:04 +02:00
parent 8bdd7166b8
commit 05916239c7
3 changed files with 6 additions and 6 deletions

View file

@ -61,7 +61,7 @@ func (a *Authenticator) requireUserProperty(has hasUserProperty) gin.HandlerFunc
// RequireUser returns a Gin middleware which requires valid user credentials to be supplied with the request.
func (a *Authenticator) RequireUser() gin.HandlerFunc {
return a.requireUserProperty(func(user *model.User) bool {
return a.requireUserProperty(func(_ *model.User) bool {
return true
})
}

View file

@ -13,9 +13,9 @@ var (
)
func randIntn(n int) int {
max := big.NewInt(int64(n))
maxValue := big.NewInt(int64(n))
res, err := rand.Int(rand.Reader, max)
res, err := rand.Int(rand.Reader, maxValue)
if err != nil {
panic("random source is not available")
}