func New() (agent.Agent, net.Conn, error) {
	if pageantWindow() != 0 {
		return agent.NewClient(&conn{}), nil, nil
	}
	conn, err := winio.DialPipe(sshAgentPipe, nil)
	if err != nil {
		return nil, nil, errors.New(
			"SSH agent requested, but could not detect Pageant or Windows native SSH agent",
		)
	}
	return agent.NewClient(conn), nil, nil
}
New returns a new agent.Agent and the (custom) connection it uses
to communicate with a running pagent.exe instance (see README.md)
package sshagent
import (
	"errors"
	"io"
	"net"
	"sync"
	"github.com/Microsoft/go-winio"
	"golang.org/x/crypto/ssh/agent"
)
const (
	sshAgentPipe = `\\.\pipe\openssh-ssh-agent`
)
func Available() bool {
	if pageantWindow() != 0 {
		return true
	}
	conn, err := winio.DialPipe(sshAgentPipe, nil)
	if err != nil {
		return false
	}
	conn.Close()
	return true
}