mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-22 19:38:35 +00:00
* 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>
26 lines
495 B
Go
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
|
|
}
|