Skip to content

Instantly share code, notes, and snippets.

@tobstarr
Last active December 26, 2015 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tobstarr/7122370 to your computer and use it in GitHub Desktop.
Save tobstarr/7122370 to your computer and use it in GitHub Desktop.
package main
import (
"net/http"
"os"
"syscall"
)
func main() {
var proto string
if os.Getenv("NO_HTTPS") == "true" {
proto = "http://"
} else {
proto = "https://"
}
rsp, _ := http.Get(proto + "www.apple.com")
defer rsp.Body.Close()
syscall.Exec("/usr/bin/ssh", []string{"ssh", "-l", "git", "github.com"}, os.Environ())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment