@@ -31,7 +31,7 @@ func ConnectToHost(ctx context.Context, config ConnectionConfig) (*Client, error
3131 dial : d .DialContext ,
3232 privateKey : config .PrivKey ,
3333 }
34- fmt .Printf ("local_ip: %s, public_ip: %s\n " , localIP , publicIP )
34+ fmt .Printf ("local_ip: %s, public_ip: %s\n " , localIP , publicIP ) // TODO: use logger
3535 err := sshClient .Connect (ctx )
3636 if err != nil {
3737 return nil , fmt .Errorf ("failed to connect: %w" , err )
@@ -242,19 +242,19 @@ func StartTestSSHServer(options TestSSHServerOptions) (func() error, error) {
242242 authorizedKey := gossh .MarshalAuthorizedKey (s .PublicKey ())
243243 _ , err := io .WriteString (s , fmt .Sprintf ("public key used by %s:\n " , s .User ())) // writes to client output
244244 if err != nil {
245- fmt .Println (err )
245+ fmt .Println (err ) // TODO: use logger
246246 }
247247 _ , err = s .Write (authorizedKey )
248248 if err != nil {
249- fmt .Println (err )
249+ fmt .Println (err ) // TODO: use logger
250250 }
251251 _ , err = s .Write ([]byte (s .RawCommand ()))
252252 if err != nil {
253- fmt .Println (err )
253+ fmt .Println (err ) // TODO: use logger
254254 }
255255 err = s .Exit (options .ExitCode )
256256 if err != nil {
257- fmt .Println (err )
257+ fmt .Println (err ) // TODO: use logger
258258 }
259259 }
260260
@@ -275,7 +275,7 @@ func StartTestSSHServer(options TestSSHServerOptions) (func() error, error) {
275275 go func () {
276276 err1 := server .ListenAndServe ()
277277 if err1 != nil {
278- fmt .Println (err1 )
278+ fmt .Println (err1 ) // TODO: use logger
279279 }
280280 }()
281281 time .Sleep (100 * time .Millisecond )
@@ -377,7 +377,7 @@ func TrySSHConnect(ctx context.Context, c ConnectionConfig, options WaitForSSHOp
377377 defer func () {
378378 if closeErr := con .Close (); closeErr != nil {
379379 // Log close error but don't return it as it's not the primary error
380- fmt .Printf ("warning: failed to close SSH connection: %v\n " , closeErr )
380+ fmt .Printf ("warning: failed to close SSH connection: %v\n " , closeErr ) // TODO: use logger
381381 }
382382 }()
383383 _ , _ , err = con .RunCommand (ctx , options .CheckCmd )
0 commit comments