0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-08-22 19:38:35 +00:00
terraform-provider-proxmox/proxmox/ssh/client_notwindows.go
renovate[bot] 092edf2d08
chore(deps): update golangci/golangci-lint (v2.2.2 → v2.3.0) (#2056)
* chore(deps): update golangci/golangci-lint (v2.2.2 → v2.3.0)

| datasource      | package                | from   | to     |
| --------------- | ---------------------- | ------ | ------ |
| github-releases | golangci/golangci-lint | v2.2.2 | v2.3.0 |

* fix: linter errors

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-07-28 08:47:20 -04:00

28 lines
554 B
Go

//go:build !windows
package ssh
import (
"context"
"errors"
"fmt"
"net"
)
// dialSocket dials a Unix domain socket.
func dialSocket(ctx context.Context, address string) (net.Conn, error) {
if address == "" {
return nil, errors.New("failed connecting to SSH agent socket: the socket file is not defined, " +
"authentication will fall back to password")
}
dialer := &net.Dialer{}
conn, err := dialer.DialContext(ctx, "unix", address)
if err != nil {
return nil, fmt.Errorf("error dialing unix socket: %w", err)
}
return conn, nil
}