INNER CODE UNIT · Go
binaryName
openocta/openocta · src/cmd/openocta-launcher/main.go:63
func binaryName(base string) string {
if runtime.GOOS == "windows" {
return base + ".exe"
}
return base
}
func waitForHealthy(url string, timeout time.Duration) error {
deadline := time.Now().Add(timeout)
client := &http.Client{Timeout: 800 * time.Millisecond}
for time.Now().Before(deadline) {
req, _ := http.NewRequest("GET", url, nil)
res, err := client.Do(req)
if err == nil {
_ = res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 500 {
return nil
}