Skip to content

Instantly share code, notes, and snippets.

@noamt
Last active February 18, 2020 15:50
Show Gist options
  • Save noamt/7399f920d941b2b2f0e94cf9c6c46cba to your computer and use it in GitHub Desktop.
Save noamt/7399f920d941b2b2f0e94cf9c6c46cba to your computer and use it in GitHub Desktop.
For blog post "Simulating SSL outages with Go"
package reachout
import (
"fmt"
"net/http"
"os"
)
func ReachOut() string {
host := os.Getenv("API_HOST")
url := fmt.Sprintf("%s/api/ping", host)
resp, err := http.DefaultClient.Get(url)
// deal with response
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment