Skip to content

Instantly share code, notes, and snippets.

@james4k
Forked from tobstarr/test.go
Created October 23, 2013 17:36
Show Gist options
  • Save james4k/7123126 to your computer and use it in GitHub Desktop.
Save james4k/7123126 to your computer and use it in GitHub Desktop.
package main
import (
"log"
"net/http"
"os"
"os/exec"
)
func main() {
rsp, err := http.Get("https://www.apple.com")
//rsp, err := http.Get("http://www.apple.com")
if err != nil {
panic(err)
}
defer rsp.Body.Close()
ip := "github.com"
cmd := exec.Command("/usr/bin/ssh", "-l", "git", ip)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err = cmd.Run()
if err != nil {
panic(err)
}
log.Println("after the call")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment