matchers

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package matchers holds the matching functions used to find mime types.

Index

Constants

View Source
const ReadLimit = 520

ReadLimit is the maximum number of bytes read from the input when detecting a reader.

Variables

This section is empty.

Functions

func AMp4

func AMp4(in []byte) bool

AMp4 matches an audio MP4 file.

func Aiff

func Aiff(in []byte) bool

Aiff matches Audio Interchange File Format file.

func Amr

func Amr(in []byte) bool

Amr matches an Adaptive Multi-Rate file.

func Ape

func Ape(in []byte) bool

Ape matches a Monkey's Audio file.

func Au

func Au(in []byte) bool

Au matches a Sun Microsystems au file.

func Avi

func Avi(in []byte) bool

Avi matches an Audio Video Interleaved file.

func Bmp

func Bmp(in []byte) bool

Bmp matches a bitmap image file.

func Class

func Class(in []byte) bool

Class matches an java class file.

func Collada

func Collada(in []byte) bool

Collada matches a COLLAborative Design Activity file.

func Crx

func Crx(in []byte) bool

Crx matches a Chrome extension file: a zip archive prepended by "Cr24".

func Doc

func Doc(in []byte) bool

Doc matches a Microsoft Office 97-2003 file.

func Docx

func Docx(in []byte) bool

Docx matches a Microsoft Office 2007 file.

func Epub

func Epub(in []byte) bool

Epub matches an EPUB file.

func False

func False(_ []byte) bool

False is a dummy matching function used to never match input.

func Flac

func Flac(in []byte) bool

Flac matches a Free Lossless Audio Codec file.

func Flv

func Flv(in []byte) bool

Flv matches a Flash video file.

func GeoJson added in v0.3.2

func GeoJson(in []byte) bool

GeoJson matches a RFC 7946 GeoJSON file.

BUG(gabriel-vasile): The "type" key should be searched for in the root object.

func Gif

func Gif(in []byte) bool

Gif matches a Graphics Interchange Format file.

func Gml

func Gml(in []byte) bool

Gml matches a Geography Markup Language file.

func Gpx

func Gpx(in []byte) bool

Gpx matches a GPS Exchange Format file.

func Gzip

func Gzip(in []byte) bool

Gzip matched gzip files based on http://www.zlib.org/rfc-gzip.html#header-trailer.

func Html

func Html(in []byte) bool

Html matches a Hypertext Markup Language file.

func Ico

func Ico(in []byte) bool

Ico matches an ICO file.

func Jar

func Jar(in []byte) bool

Jar matches a Java archive file.

func Jpg

func Jpg(in []byte) bool

Jpg matches a Joint Photographic Experts Group file.

func Js

func Js(in []byte) bool

Js matches a Javascript file.

func Json

func Json(in []byte) bool

Json matches a JavaScript Object Notation file.

func Kml

func Kml(in []byte) bool

Kml matches a Keyhole Markup Language file.

func Lua

func Lua(in []byte) bool

Lua matches a Lua programming language file.

func M4a

func M4a(in []byte) bool

M4a matches an audio M4A file.

func Midi

func Midi(in []byte) bool

Midi matches a Musical Instrument Digital Interface file.

func Mkv

func Mkv(in []byte) bool

Mkv matches a mkv file.

func Mp3

func Mp3(in []byte) bool

Mp3 matches an mp3 file.

func Mp4

func Mp4(in []byte) bool

Mp4 matches an MP4 file.

func Mpeg

func Mpeg(in []byte) bool

Mpeg matches a Moving Picture Experts Group file.

func Mqv

func Mqv(in []byte) bool

Mqv matches a Sony / Mobile QuickTime file.

func MusePack

func MusePack(in []byte) bool

MusePack matches a Musepack file.

func Ogg

func Ogg(in []byte) bool

Ogg matches an Ogg file.

func Pdf

func Pdf(in []byte) bool

Pdf matches a Portable Document Format file.

func Perl

func Perl(in []byte) bool

Perl matches a Perl programming language file.

func Php

func Php(in []byte) bool

Php matches a PHP: Hypertext Preprocessor file.

func Png

func Png(in []byte) bool

Png matches a Portable Network Graphics file.

func Ppt

func Ppt(in []byte) bool

Ppt matches a Microsoft PowerPoint 97-2003 file.

func Pptx

func Pptx(in []byte) bool

Pptx matches a Microsoft PowerPoint 2007 file.

func Ps

func Ps(in []byte) bool

Ps matches a PostScript file.

func Psd

func Psd(in []byte) bool

Psd matches a Photoshop Document file.

func Python

func Python(in []byte) bool

Python matches a Python programming language file.

func QuickTime

func QuickTime(in []byte) bool

QuickTime matches a QuickTime File Format file.

func Rtf

func Rtf(in []byte) bool

Rtf matches a Rich Text Format file.

func SevenZ

func SevenZ(in []byte) bool

SevenZ matches a 7z archive.

func Svg

func Svg(in []byte) bool

Svg matches a SVG file.

func Swf

func Swf(in []byte) bool

Swf matches an Adobe Flash swf file.

func Tar

func Tar(in []byte) bool

Tar matches a (t)ape (ar)chive file.

func Tcl

func Tcl(in []byte) bool

Tcl matches a Tcl programming language file.

func Tcx

func Tcx(in []byte) bool

Tcx matches a Training Center XML file.

func ThreeG2

func ThreeG2(in []byte) bool

ThreeG2 matches a 3GPP2 file.

func ThreeGP

func ThreeGP(in []byte) bool

ThreeGP matches a 3GPP file.

func Tiff

func Tiff(in []byte) bool

Tiff matches a Tagged Image File Format file.

func True

func True(_ []byte) bool

True is a dummy matching function used to match any input.

func Txt

func Txt(in []byte) bool

Txt matches a text file.

func Wasm

func Wasm(in []byte) bool

Wasm matches a web assembly File Format file.

func Wav

func Wav(in []byte) bool

Wav matches a Waveform Audio File Format file.

func WebM

func WebM(in []byte) bool

WebM matches a WebM file.

func Webp

func Webp(in []byte) bool

Webp matches a WebP file.

func Woff

func Woff(in []byte) bool

Woff matches a Web Open Font Format file.

func Woff2

func Woff2(in []byte) bool

Woff2 matches a Web Open Font Format version 2 file.

func X3d

func X3d(in []byte) bool

X3d matches an Extensible 3D Graphics file.

func Xls

func Xls(in []byte) bool

Xls matches a Microsoft Excel 97-2003 file.

func Xlsx

func Xlsx(in []byte) bool

Xlsx matches a Microsoft Excel 2007 file.

func Xml

func Xml(in []byte) bool

Xml matches an Extensible Markup Language file.

func Zip

func Zip(in []byte) bool

Zip matches a zip archive.

Types

This section is empty.

Notes

Bugs

  • The "type" key should be searched for in the root object.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL