oembed/is_valid_url.go

9 lines
126 B
Go
Raw Permalink Normal View History

package oembed
import "net/url"
func isValidURL(src string) bool {
_, err := url.ParseRequestURI(src)
return err == nil
}