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_windows.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

26 lines
495 B
Go

//go:build windows
package ssh
import (
"context"
"fmt"
"net"
"github.com/Microsoft/go-winio"
)
// dialSocket dials a Windows named pipe. If address is empty, it dials the default ssh-agent pipe.
func dialSocket(ctx context.Context, address string) (net.Conn, error) {
if address == "" {
address = `\\.\pipe\openssh-ssh-agent`
}
conn, err := winio.DialPipeContext(ctx, address)
if err != nil {
return nil, fmt.Errorf("error dialing named pipe: %w", err)
}
return conn, nil
}