github.com/onsi/ginkgo@v1.16.6-0.20211118180735-4e1925ba4c95/internal/test_helpers/status_code_poller.go (about) 1 package test_helpers 2 3 import "net/http" 4 5 func StatusCodePoller(url string) func() int { 6 return func() int { 7 resp, err := http.Get(url) 8 if err != nil { 9 return 0 10 } 11 resp.Body.Close() 12 return resp.StatusCode 13 } 14 }