Documentation
¶
Overview ¶
Package validateurl contains URL validation helpers shared by Lanyard packages.
The primary helper, ParseHTTPSAbsoluteNoQueryFragment, accepts only absolute HTTPS URLs without query or fragment components. It returns sentinel errors such as ErrInvalidFormat, ErrInvalidHTTPS, and ErrQueryOrFragment so callers can classify validation failures with errors.Is.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidFormat reports a URL string that cannot be parsed. ErrInvalidFormat = errors.New("invalid URL format") // ErrInvalidHTTPS reports a URL that is not absolute HTTPS with a host. ErrInvalidHTTPS = errors.New("URL must be an absolute https URL") // ErrQueryOrFragment reports a URL containing query or fragment components. ErrQueryOrFragment = errors.New("URL must not include query or fragment") )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.