mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-15 04:35:16 +00:00
20
healthcheck/heathcheck.go
Normal file
20
healthcheck/heathcheck.go
Normal file
@@ -0,0 +1,20 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user