fix: fix test_ssh.go log function calls

This commit is contained in:
2026-04-19 08:38:15 +08:00
parent 6a800164c4
commit fa1a36c45b
+4 -4
View File
@@ -3,7 +3,6 @@ package main
import ( import (
"fmt" "fmt"
"io" "io"
"next-terminal/server/log"
"os" "os"
"time" "time"
@@ -30,7 +29,8 @@ func main() {
client, err := ssh.Dial("tcp", "172.16.101.32:22", sshConfig) client, err := ssh.Dial("tcp", "172.16.101.32:22", sshConfig)
if err != nil { if err != nil {
log.Error(err) fmt.Println(err)
return
} }
defer client.Close() defer client.Close()
@@ -87,9 +87,9 @@ func (t *SSHTerminal) interactiveSession() error {
defer func() { defer func() {
if t.exitMsg == "" { if t.exitMsg == "" {
log.Info(os.Stdout, "the connection was closed on the remote side on ", time.Now().Format(time.RFC822)) fmt.Println("the connection was closed on the remote side on", time.Now().Format(time.RFC822))
} else { } else {
log.Info(os.Stdout, t.exitMsg) fmt.Println(t.exitMsg)
} }
}() }()