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 (
"fmt"
"io"
"next-terminal/server/log"
"os"
"time"
@@ -30,7 +29,8 @@ func main() {
client, err := ssh.Dial("tcp", "172.16.101.32:22", sshConfig)
if err != nil {
log.Error(err)
fmt.Println(err)
return
}
defer client.Close()
@@ -87,9 +87,9 @@ func (t *SSHTerminal) interactiveSession() error {
defer func() {
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 {
log.Info(os.Stdout, t.exitMsg)
fmt.Println(t.exitMsg)
}
}()