Source File
sshagent.go
Belonging Package
github.com/xanzy/ssh-agent
package sshagent
import (
)
func () (agent.Agent, net.Conn, error) {
if !Available() {
return nil, nil, errors.New("SSH agent requested but SSH_AUTH_SOCK not-specified")
}
:= os.Getenv("SSH_AUTH_SOCK")
, := net.Dial("unix", )
if != nil {
return nil, nil, fmt.Errorf("Error connecting to SSH_AUTH_SOCK: %v", )
}
return agent.NewClient(), , nil
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |