diff --git a/pkg/srun/srun.go b/pkg/srun/srun.go index 9546789..474aab8 100644 --- a/pkg/srun/srun.go +++ b/pkg/srun/srun.go @@ -55,8 +55,9 @@ func (c Srun) LoginStatus() (online *bool, ip *string, err error) { errRes, ok := res["error"] if ok { isOnlineStr, ok := errRes.(string) - if ok && isOnlineStr == "ok" { - online = &ok + if ok { + isOnline := isOnlineStr == "ok" + online = &isOnline } }