Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentType ¶
type ContentType string
ContentType represents the MIME type of a file.
const ( ContentTypeUnknown ContentType = "application/unknown" ContentTypeJSON ContentType = "application/json" ContentTypeOctet ContentType = "application/octet-stream" )
func ContentTypeFromString ¶
func ContentTypeFromString(s string) ContentType
func GetContentTypeFromExtension ¶
func GetContentTypeFromExtension(extension string) ContentType
GetContentTypeFromExtension returns the MIME type of a file based on its extension.
Click to show internal directories.
Click to hide internal directories.