MSSQL: Add HostName method (#87309)

* Add HostName method

* Add test

* Fix lint
This commit is contained in:
Andreas Christou
2024-05-03 15:45:34 +01:00
committed by GitHub
parent ac8f3f6e86
commit 28df41fd96
2 changed files with 40 additions and 3 deletions
+4
View File
@@ -14,6 +14,10 @@ type HostTransportDialer struct {
Host string
}
func (m HostTransportDialer) HostName() string {
return m.Host
}
func (m HostTransportDialer) DialContext(ctx context.Context, network string, addr string) (conn net.Conn, err error) {
return m.Dialer.DialContext(ctx, network, addr)
}