Перенести Go API и контейнер из лабораторной 1

This commit is contained in:
Dima
2026-09-23 21:22:49 +03:00
parent 65003b6119
commit a858d3325b
21 changed files with 2375 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package main
import (
"net/http"
"os"
"time"
)
func main() {
client := http.Client{
Timeout: 2 * time.Second,
}
response, err := client.Get("http://127.0.0.1:8080/health/ready")
if err != nil {
os.Exit(1)
}
defer response.Body.Close()
if response.StatusCode != http.StatusOK {
os.Exit(1)
}
}