package matchers
import "github.com/gabriel-vasile/mimetype/internal/matchers"
Package matchers holds the matching functions used to find mime types.
Index ¶
- Constants
- func AMp4(in []byte) bool
- func Aiff(in []byte) bool
- func Amr(in []byte) bool
- func Ape(in []byte) bool
- func Ar(in []byte) bool
- func Asf(in []byte) bool
- func Au(in []byte) bool
- func Avi(in []byte) bool
- func Bmp(in []byte) bool
- func Bz2(in []byte) bool
- func Class(in []byte) bool
- func Collada(in []byte) bool
- func Crx(in []byte) bool
- func Csv(in []byte) bool
- func Dbf(in []byte) bool
- func Dcm(in []byte) bool
- func Doc(in []byte) bool
- func Docx(in []byte) bool
- func Elf(in []byte) bool
- func ElfDump(in []byte) bool
- func ElfExe(in []byte) bool
- func ElfLib(in []byte) bool
- func ElfObj(in []byte) bool
- func Epub(in []byte) bool
- func Exe(in []byte) bool
- func False([]byte) bool
- func Fits(in []byte) bool
- func Flac(in []byte) bool
- func Flv(in []byte) bool
- func GeoJson(in []byte) bool
- func Gif(in []byte) bool
- func Gml(in []byte) bool
- func Gpx(in []byte) bool
- func Gzip(in []byte) bool
- func Html(in []byte) bool
- func Ico(in []byte) bool
- func Jar(in []byte) bool
- func Jpg(in []byte) bool
- func Js(in []byte) bool
- func Json(in []byte) bool
- func Kml(in []byte) bool
- func Lua(in []byte) bool
- func M4a(in []byte) bool
- func Midi(in []byte) bool
- func Mkv(in []byte) bool
- func Mp3(in []byte) bool
- func Mp4(in []byte) bool
- func Mpeg(in []byte) bool
- func Mqv(in []byte) bool
- func MusePack(in []byte) bool
- func Odf(in []byte) bool
- func Odg(in []byte) bool
- func Odp(in []byte) bool
- func Ods(in []byte) bool
- func Odt(in []byte) bool
- func Ogg(in []byte) bool
- func Otg(in []byte) bool
- func Otp(in []byte) bool
- func Ots(in []byte) bool
- func Ott(in []byte) bool
- func Pdf(in []byte) bool
- func Perl(in []byte) bool
- func Php(in []byte) bool
- func Png(in []byte) bool
- func Ppt(in []byte) bool
- func Pptx(in []byte) bool
- func Ps(in []byte) bool
- func Psd(in []byte) bool
- func Python(in []byte) bool
- func QuickTime(in []byte) bool
- func Rtf(in []byte) bool
- func SevenZ(in []byte) bool
- func Shp(in []byte) bool
- func Shx(in []byte) bool
- func Svg(in []byte) bool
- func Swf(in []byte) bool
- func Tar(in []byte) bool
- func Tcl(in []byte) bool
- func Tcx(in []byte) bool
- func ThreeG2(in []byte) bool
- func ThreeGP(in []byte) bool
- func Tiff(in []byte) bool
- func True([]byte) bool
- func Tsv(in []byte) bool
- func Txt(in []byte) bool
- func Wasm(in []byte) bool
- func Wav(in []byte) bool
- func WebM(in []byte) bool
- func Webp(in []byte) bool
- func Woff(in []byte) bool
- func Woff2(in []byte) bool
- func X3d(in []byte) bool
- func Xar(in []byte) bool
- func Xls(in []byte) bool
- func Xlsx(in []byte) bool
- func Xml(in []byte) bool
- func Zip(in []byte) bool
- Bugs
Constants ¶
const ReadLimit = 2048
ReadLimit is the maximum number of bytes read from the input when detecting a reader.
Functions ¶
func AMp4 ¶
AMp4 matches an audio MP4 file.
func Aiff ¶
Aiff matches Audio Interchange File Format file.
func Amr ¶
Amr matches an Adaptive Multi-Rate file.
func Ape ¶
Ape matches a Monkey's Audio file.
func Ar ¶
Ar matches an ar (Unix) archive file.
func Asf ¶
Asf matches an Advanced Systems Format file.
func Au ¶
Au matches a Sun Microsystems au file.
func Avi ¶
Avi matches an Audio Video Interleaved file.
func Bmp ¶
Bmp matches a bitmap image file.
func Bz2 ¶
Bz2 matches a bzip2 file.
func Class ¶
Class matches an java class file.
func Collada ¶
Collada matches a COLLAborative Design Activity file.
func Crx ¶
Crx matches a Chrome extension file: a zip archive prepended by "Cr24".
func Csv ¶
Csv matches a comma-separated values file.
func Dbf ¶
Dbf matches a dBase file. https://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm
func Dcm ¶
Dcm matches a DICOM medical format file.
func Doc ¶
Doc matches a Microsoft Office 97-2003 file.
func Docx ¶
Docx matches a Microsoft Office 2007 file.
func Elf ¶
Elf matches an Executable and Linkable Format file.
func ElfDump ¶
ElfDump matches a core dump file.
func ElfExe ¶
ElfExe matches an executable file.
func ElfLib ¶
ElfLib matches a shared library file.
func ElfObj ¶
ElfObj matches an object file.
func Epub ¶
Epub matches an EPUB file.
func Exe ¶
Exe matches a Windows/DOS executable file.
func False ¶
False is a dummy matching function used to never match input.
func Fits ¶
Fits matches an Flexible Image Transport System file.
func Flac ¶
Flac matches a Free Lossless Audio Codec file.
func Flv ¶
Flv matches a Flash video file.
func GeoJson ¶
GeoJson matches a RFC 7946 GeoJSON file.
BUG(gabriel-vasile): The "type" key should be searched for in the root object.
func Gif ¶
Gif matches a Graphics Interchange Format file.
func Gml ¶
Gml matches a Geography Markup Language file.
func Gpx ¶
Gpx matches a GPS Exchange Format file.
func Gzip ¶
Gzip matched gzip files based on http://www.zlib.org/rfc-gzip.html#header-trailer.
func Html ¶
Html matches a Hypertext Markup Language file.
func Ico ¶
Ico matches an ICO file.
func Jar ¶
Jar matches a Java archive file.
func Jpg ¶
Jpg matches a Joint Photographic Experts Group file.
func Js ¶
Js matches a Javascript file.
func Json ¶
Json matches a JavaScript Object Notation file.
func Kml ¶
Kml matches a Keyhole Markup Language file.
func Lua ¶
Lua matches a Lua programming language file.
func M4a ¶
M4a matches an audio M4A file.
func Midi ¶
Midi matches a Musical Instrument Digital Interface file.
func Mkv ¶
Mkv matches a mkv file.
func Mp3 ¶
Mp3 matches an mp3 file.
func Mp4 ¶
Mp4 matches an MP4 file.
func Mpeg ¶
Mpeg matches a Moving Picture Experts Group file.
func Mqv ¶
Mqv matches a Sony / Mobile QuickTime file.
func MusePack ¶
MusePack matches a Musepack file.
func Odf ¶
Odf matches an OpenDocument Formula file.
func Odg ¶
Odg matches an OpenDocument Drawing file.
func Odp ¶
Odp matches an OpenDocument Presentation file.
func Ods ¶
Ods matches an OpenDocument Spreadsheet file.
func Odt ¶
Odt matches an OpenDocument Text file.
func Ogg ¶
Ogg matches an Ogg file.
func Otg ¶
Otg matches an OpenDocument Drawing Template file.
func Otp ¶
Otp matches an OpenDocument Presentation Template file.
func Ots ¶
Ots matches an OpenDocument Spreadsheet Template file.
func Ott ¶
Ott matches an OpenDocument Text Template file.
func Pdf ¶
Pdf matches a Portable Document Format file.
func Perl ¶
Perl matches a Perl programming language file.
func Php ¶
Php matches a PHP: Hypertext Preprocessor file.
func Png ¶
Png matches a Portable Network Graphics file.
func Ppt ¶
Ppt matches a Microsoft PowerPoint 97-2003 file.
func Pptx ¶
Pptx matches a Microsoft PowerPoint 2007 file.
func Ps ¶
Ps matches a PostScript file.
func Psd ¶
Psd matches a Photoshop Document file.
func Python ¶
Python matches a Python programming language file.
func QuickTime ¶
QuickTime matches a QuickTime File Format file.
func Rtf ¶
Rtf matches a Rich Text Format file.
func SevenZ ¶
SevenZ matches a 7z archive.
func Shp ¶
Shp matches a shape format file. https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf
func Shx ¶
Shx matches a shape index format file. https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf
func Svg ¶
Svg matches a SVG file.
func Swf ¶
Swf matches an Adobe Flash swf file.
func Tar ¶
Tar matches a (t)ape (ar)chive file.
func Tcl ¶
Tcl matches a Tcl programming language file.
func Tcx ¶
Tcx matches a Training Center XML file.
func ThreeG2 ¶
ThreeG2 matches a 3GPP2 file.
func ThreeGP ¶
ThreeGP matches a 3GPP file.
func Tiff ¶
Tiff matches a Tagged Image File Format file.
func True ¶
True is a dummy matching function used to match any input.
func Tsv ¶
Tsv matches a tab-separated values file.
func Txt ¶
Txt matches a text file.
func Wasm ¶
Wasm matches a web assembly File Format file.
func Wav ¶
Wav matches a Waveform Audio File Format file.
func WebM ¶
WebM matches a WebM file.
func Webp ¶
Webp matches a WebP file.
func Woff ¶
Woff matches a Web Open Font Format file.
func Woff2 ¶
Woff2 matches a Web Open Font Format version 2 file.
func X3d ¶
X3d matches an Extensible 3D Graphics file.
func Xar ¶
Xar matches an eXtensible ARchive format file.
func Xls ¶
Xls matches a Microsoft Excel 97-2003 file.
func Xlsx ¶
Xlsx matches a Microsoft Excel 2007 file.
func Xml ¶
Xml matches an Extensible Markup Language file.
func Zip ¶
Zip matches a zip archive.
Bugs ¶
☞ The "type" key should be searched for in the root object.
Source Files ¶
archive.go audio.go binary.go document.go fonts.go geo.go image.go matchers.go ms_office.go odf.go signature.go text.go text_csv.go video.go video_ftyp.go
- Version
- v0.3.7
- Published
- May 8, 2019
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 hours ago –
Tools for package owners.