package
0.0.0-20241005165219-eb1bcf33780f
Repository: https://github.com/root4loot/goutils.git
Documentation: pkg.go.dev

# Functions

CanReachURL checks if a URL can be reached without a timeout.
CanReachURLWithTimeout checks if a URL can be reached with a specified timeout.
EnsureHTTP ensures that the URL has an HTTP scheme, replacing any existing scheme.
EnsureHTTPS ensures that the URL has an HTTPS scheme, replacing any existing scheme.
EnsurePortIsSet ensures a URL has a port set.
EnsureTrailingSlash ensures a URL has a trailing slash.
GetExt returns the file extension of a raw URL string.
GetMediaExtensions returns a slice of common media file extensions.
GetOrigin returns the origin of a URL.
HasFileExtension checks if the given rawURL string has a file extension in its path.
HasParam checks if a rawURL string has parameters.
HasScheme checks if a URL has a scheme.
IsMediaExt checks if a file extension is a media type.
IsURL checks if a string is a URL.
IsValidURL checks if a string is a valid URL.
NormalizeSlashes trims double slashes from a URL, preserving the initial scheme.
RemoveDefaultPort removes the default port from a URL based on its scheme.
RemoveTrailingSlash removes an unwanted "/" suffix from a URL.