Documentation
¶
Overview ¶
Package urlutil provides utilities for working with URLs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidScheme is returned by [Get] when the scheme of // the provided URL is not supported. ErrInvalidScheme = errors.New("invalid scheme") // ErrInvalidURL is returned by [Get] when the provided URL is // not valid. ErrInvalidURL = errors.New("invalid URL") )
Functions ¶
func Get ¶
Get retrieves the contents from a given raw URL. It returns error if the URL is not valid or if it is not possible to get the contents.
It supports the following schemes: http, https. If the provided URL does not specify a scheme, it is considered a file path. In the case of http and https, the contents are retrieved issuing an HTTP GET request.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.