mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
feat: add check
This commit is contained in:
parent
7230e50bec
commit
2c4734184c
@ -2,7 +2,9 @@ package service_test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/foomo/keel"
|
"github.com/foomo/keel"
|
||||||
"github.com/foomo/keel/service"
|
"github.com/foomo/keel/service"
|
||||||
@ -24,6 +26,9 @@ func ExampleNewHTTP() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
go func() {
|
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
|
resp, _ := http.Get("http://localhost:8080") //nolint:noctx
|
||||||
defer resp.Body.Close() //nolint:govet
|
defer resp.Body.Close() //nolint:govet
|
||||||
b, _ := io.ReadAll(resp.Body)
|
b, _ := io.ReadAll(resp.Body)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user