fix: fix test_ssh.go log function calls
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user