File: ping.go

package info (click to toggle)
golang-github-thomasrooney-gexpect 0.0~git20161231.5482f03-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 104 kB
  • sloc: makefile: 7
file content (15 lines) | stat: -rw-r--r-- 264 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main

import gexpect "github.com/ThomasRooney/gexpect"
import "log"

func main() {
	log.Printf("Testing Ping interact... \n")

	child, err := gexpect.Spawn("ping -c8 127.0.0.1")
	if err != nil {
		panic(err)
	}
	child.Interact()
	log.Printf("Success\n")
}