This commit is contained in:
laurentu committed 2023-08-11 15:17:50 +02:00
commit e7cca80808
2 files changed
+22

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
module passke.org/hostchecker
go 1.19
+19
View File
@@ -0,0 +1,19 @@
package main
import "fmt"
import "net/http"
import "io"
func main() {
fmt.Println("staring")
resp, err := http.Head("http://example.com")
if err != nil {
fmt.Println("Failed")
} else {
_, _ = io.ReadAll(resp.Body)
resp.Body.Close()
fmt.Println("status", resp.StatusCode)
}
}