package mimetype
import "github.com/gabriel-vasile/mimetype"
Package mimetype uses magic number signatures to detect the MIME type and extension of a file.
Index ¶
- func Detect(in []byte) (mime, extension string)
- func DetectFile(file string) (mime, extension string, err error)
- func DetectReader(r io.Reader) (mime, extension string, err error)
Functions ¶
func Detect ¶
Detect returns the MIME type and extension of the provided byte slice.
func DetectFile ¶
DetectFile returns the MIME type and extension of the provided file.
func DetectReader ¶
DetectReader returns the MIME type and extension of the byte slice read from the provided reader.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal |
- Version
- v0.3.2
- Published
- Apr 14, 2019
- Platform
- windows/amd64
- Imports
- 3 packages
- Last checked
- 4 hours ago –
Tools for package owners.