Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddQueryParamToUrl ¶
func CreatePath ¶
CreatePath creates a path from the given parts.
If addLeadingSlash is true, a leading slash will be added to the path.
All colliding slashes will be converted to a single slash.
func FormatFileSize ¶
FormatFileSize pretty prints a file size (in bytes) to a human-readable format
e.g. 1024 -> 1 KB
func GetContentTypeFromFileName ¶
GetContentTypeFromFileName returns the content type of a file based on its file extension from the name.
If the file extension is not recognized, it returns "application/octet-stream".
func RemoveLeadingSlash ¶
RemoveLeadingSlash removes the leading slash from a string.
func RemoveTrailingSlash ¶
RemoveTrailingSlash removes the trailing slash from a string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.