From bbbb7461d19e611e6fab3f24edd5f8e0d2d45b1e Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 15 Feb 2026 08:28:43 +0200 Subject: refactor: implement context-aware network dialing Modernize network dialing to use Go's context-aware patterns for better cancellation support and connection reliability. Changes: - Update Go version from 1.24 to 1.25 in go.mod - Replace ssh.Dial with net.Dialer.DialContext + ssh.NewClientConn for SSH client connections in serverconnection.go - Add TCP KeepAlive (30s) for SSH connection health monitoring - Implement context-aware dialing for SSH agent connections in ssh.go - Improve error messages to distinguish dial vs SSH handshake failures - Update AGENTS.md with integration test requirements Benefits: - Context cancellation now properly affects connection establishment - TCP KeepAlive prevents silent connection failures - Better integration with Go's cancellation patterns - Improved reliability for distributed systems All integration tests pass with race detection enabled. Co-Authored-By: Claude Sonnet 4.5 --- go.mod | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'go.mod') diff --git a/go.mod b/go.mod index ee6402d..8a349ba 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/mimecast/dtail -go 1.24 +go 1.25 require ( github.com/DataDog/zstd v1.5.7 @@ -8,8 +8,4 @@ require ( golang.org/x/term v0.32.0 ) -require ( - golang.org/x/lint v0.0.0-20241112194109-818c5a804067 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 // indirect -) +require golang.org/x/sys v0.33.0 // indirect -- cgit v1.2.3