package domain

import (
	"net/url"
)

func parseURL(rawURL string) (*url.URL, error) {
	u, err := url.ParseRequestURI(rawURL)
	if err != nil {
		return nil, InvalidURLError{
			URL: rawURL,
		}
	}

	return u, nil
}
