rimgo/healthcheck/heathcheck.go
rare-magma dd206b5278
feat: add healthcheck
Signed-off-by: rare-magma <rare-magma@posteo.eu>
2024-06-29 14:09:32 +02:00

21 lines
261 B
Go

package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
if len(os.Args) < 2 {
log.Fatal("Expected URL as command-line argument")
os.Exit(1)
}
url := os.Args[1]
fmt.Println(url)
if _, err := http.Get(url); err != nil {
os.Exit(1)
}
}