feat: add check

This commit is contained in:
Kevin Franklin Kim 2023-09-11 14:09:37 +02:00
parent 7230e50bec
commit 2c4734184c
No known key found for this signature in database

View File

@ -2,7 +2,9 @@ package service_test
import (
"io"
"net"
"net/http"
"time"
"github.com/foomo/keel"
"github.com/foomo/keel/service"
@ -24,6 +26,9 @@ func ExampleNewHTTP() {
)
go func() {
if _, err := net.DialTimeout("tcp", "localhost:8080", 10*time.Second); err != nil {
panic(err.Error())
}
resp, _ := http.Get("http://localhost:8080") //nolint:noctx
defer resp.Body.Close() //nolint:govet
b, _ := io.ReadAll(resp.Body)