mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
run modernize -fix ./...
Using golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize + some manual cleanup in libpod/lock/shm/shm_lock_test.go as it generated an unused variable + restored one removed comment Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -43,7 +43,7 @@ func IsSystemdSessionValid(uid int) bool {
|
||||
logrus.Debugf("systemd-logind: %s", err)
|
||||
return false
|
||||
}
|
||||
activeSessionMap, ok := activeSession.Value().([]interface{})
|
||||
activeSessionMap, ok := activeSession.Value().([]any)
|
||||
if !ok || len(activeSessionMap) < 2 {
|
||||
// unable to get active session map.
|
||||
logrus.Debugf("systemd-logind: %s", err)
|
||||
@@ -62,7 +62,7 @@ func IsSystemdSessionValid(uid int) bool {
|
||||
logrus.Debugf("systemd-logind: %s", err)
|
||||
return false
|
||||
}
|
||||
dbusUser, ok := sessionUser.Value().([]interface{})
|
||||
dbusUser, ok := sessionUser.Value().([]any)
|
||||
if !ok {
|
||||
// not a valid user.
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user