1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-18 05:00:03 +02:00

Adding src/utils/is_url.go

This commit is contained in:
Henrik Hautakoski 2022-05-17 18:51:25 +02:00
parent affc56393e
commit 1912ef1790
No known key found for this signature in database
GPG key ID: 608414D93E862CCD

9
src/utils/is_url.go Normal file
View file

@ -0,0 +1,9 @@
package utils
import "net/url"
func IsUrl(str string) bool {
u, err := url.Parse(str)
return err == nil && u.Scheme != "" && u.Host != ""
}