mirror of
https://github.com/kataras/iris.git
synced 2025-12-27 14:57:05 +00:00
update dependencies
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module myapp
|
||||
|
||||
go 1.24.3
|
||||
go 1.25
|
||||
|
||||
require (
|
||||
github.com/go-sql-driver/mysql v1.9.2
|
||||
|
||||
@@ -45,7 +45,7 @@ func main() {
|
||||
}
|
||||
|
||||
// Validate a user from database.
|
||||
allowFunc := func(ctx iris.Context, username, password string) (interface{}, bool) {
|
||||
allowFunc := func(ctx iris.Context, username, password string) (any, bool) {
|
||||
user, err := db.getUserByUsernameAndPassword(context.Background(), username, password)
|
||||
return user, err == nil
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ func main() {
|
||||
},
|
||||
// The users can be a slice of custom users structure
|
||||
// or a map[string]string (username:password)
|
||||
// or []map[string]interface{} with username and passwords required fields,
|
||||
// or []map[string]any with username and passwords required fields,
|
||||
// read the godocs for more.
|
||||
Allow: basicauth.AllowUsers(users),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user