// Confirm the targetURL is valid and can be listened on before running tests.
Confirm the targetURL is valid and can be listened on before running tests.
// Confirm the targetURL is valid and can be listened on before running tests .
func init() {
	u, err := url.Parse(targetURL)
	if err != nil {
		panic(fmt.Sprintf("Invalid target URL: %s", err))
	}
	ln, err := net.Listen("tcp", u.Host)
	if err != nil {
		panic(fmt.Sprintf("Unable to listen on address (%s): %s", targetURL, err))
	}
	ln.Close()
}
func init ( ) { u , err := url . Parse ( targetURL ) if err != nil { panic ( fmt . Sprintf ( " " , err ) ) } ln , err := net . Listen ( " " , u . Host ) if err != nil { panic ( fmt . Sprintf ( " " , targetURL , err ) ) } ln . Close ( ) }
Confirm the targetURL is valid and can be listened on before running tests.
Confirm the targetURL is valid and can be listened on before running tests .