Registry / testing / tailscale-goexpect

tailscale-goexpect

JSON →
library0.0.0-20210902213824-6e8c725cea41gogounverified

A Go implementation of the classic TCL Expect library for automating interactive terminal applications.

go get github.com/tailscale/goexpect
INSTALL
IMPORT
SIG · TAILSCALE-GOEXPECT
T
tailscale-goexpect
testinggov0.0.0-20210902213824-6e8c725cea41
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

expect
github.com/tailscale/goexpect

Spawn an SSH session and automate login

package main import ( "context" "fmt" "github.com/tailscale/goexpect" ) func main() { e, _, err := expect.Spawn("ssh", 30*time.Second, "user@host") if err != nil { panic(err) } defer e.Close() e.Expect("password:", 10*time.Second) e.Send("mypassword\n") result, _, _ := e.Expect("$", 10*time.Second) fmt.Println(result) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20210902213824-6e8c725cea41latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Bingbot
1
Resources
tailscale-goexpect — go get tailscale-goexpect · libregistry