/usr/share/gocode/src/github.com/coreos/gexpect/examples/ping.go is in golang-github-coreos-gexpect-dev 0.1.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | package main
import gexpect "github.com/coreos/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")
}
|