1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-27 14:57:05 +00:00

update dependencies

This commit is contained in:
Gerasimos (Makis) Maropoulos
2025-08-15 23:29:20 +03:00
parent de4f462198
commit a8a3afea22
186 changed files with 694 additions and 689 deletions

View File

@@ -254,7 +254,7 @@ func makeKey(key string) []byte {
// Set sets a key value of a specific session.
// Ignore the "immutable".
func (db *Database) Set(sid string, key string, value interface{}, ttl time.Duration, immutable bool) error {
func (db *Database) Set(sid string, key string, value any, ttl time.Duration, immutable bool) error {
valueBytes, err := sessions.DefaultTranscoder.Marshal(value)
if err != nil {
db.logger.Debug(err)
@@ -282,7 +282,7 @@ func (db *Database) Set(sid string, key string, value interface{}, ttl time.Dura
}
// Get retrieves a session value based on the key.
func (db *Database) Get(sid string, key string) (value interface{}) {
func (db *Database) Get(sid string, key string) (value any) {
if err := db.Decode(sid, key, &value); err == nil {
return value
}
@@ -291,7 +291,7 @@ func (db *Database) Get(sid string, key string) (value interface{}) {
}
// Decode binds the "outPtr" to the value associated to the provided "key".
func (db *Database) Decode(sid, key string, outPtr interface{}) error {
func (db *Database) Decode(sid, key string, outPtr any) error {
err := db.Service.View(func(tx *bolt.Tx) error {
b := db.getBucketForSession(tx, sid)
if b == nil {
@@ -313,7 +313,7 @@ func (db *Database) Decode(sid, key string, outPtr interface{}) error {
}
// Visit loops through all session keys and values.
func (db *Database) Visit(sid string, cb func(key string, value interface{})) error {
func (db *Database) Visit(sid string, cb func(key string, value any)) error {
err := db.Service.View(func(tx *bolt.Tx) error {
b := db.getBucketForSession(tx, sid)
if b == nil {
@@ -321,7 +321,7 @@ func (db *Database) Visit(sid string, cb func(key string, value interface{})) er
}
return b.ForEach(func(k []byte, v []byte) error {
var value interface{}
var value any
if err := sessions.DefaultTranscoder.Unmarshal(v, &value); err != nil {
db.logger.Debugf("unable to retrieve value of key '%s' of '%s': %v", k, sid, err)
return err