{"id":51642,"library":"netflix-go-expect","title":"go-expect","description":"An expect-like interface to automate control of applications by expecting output and sending input through a pseudoterminal.","status":"active","version":"0.0.0-20220104043353-73e0943537d2","language":"go","source_language":null,"source_url":"https://github.com/Netflix/go-expect","tags":["expect","pty","automation","testing"],"install":[{"cmd":"go get github.com/Netflix/go-expect","lang":"bash","label":"Install github.com/Netflix/go-expect"}],"dependencies":[],"imports":[{"symbol":"expect","correct":"github.com/Netflix/go-expect"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"os/exec\"\n\t\"github.com/Netflix/go-expect\"\n)\n\nfunc main() {\n\tc, err := expect.NewConsole(expect.WithStdout(os.Stdout))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer c.Close()\n\n\tcmd := exec.Command(\"echo\", \"hello\")\n\tcmd.Stdin = c.Tty()\n\tcmd.Stdout = c.Tty()\n\tcmd.Stderr = c.Tty()\n\n\tgo func() {\n\t\tc.ExpectString(\"hello\")\n\t\tfmt.Println(\"matched\")\n\t}()\n\n\tcmd.Run()\n}","lang":"go","description":"Creates a console, runs a command, and expects output."},"warnings":[],"env_vars":null,"search_vec":"'applic':13 'autom':10,25 'control':11 'expect':3,6,15,23 'expect-lik':5 'go':2 'go-expect':1 'input':19 'interfac':8 'like':7 'output':16 'pseudotermin':22 'pti':24 'send':18 'test':26","created_at":"2026-06-15T06:24:48.649670+00:00","updated_at":"2026-06-15T06:24:48.649670+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Netflix/go-expect","github":"https://github.com/Netflix/go-expect","docs":"https://pkg.go.dev/github.com/Netflix/go-expect#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}