magic

package
v0.0.0-...-7a1a713 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2013 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MIMETypeFromReaderAt

func MIMETypeFromReaderAt(ra io.ReaderAt) (mime string)

MimeTypeFromReader takes a ReaderAt, sniffs the beginning of it, and returns the MIME type if sniffed, else the empty string.

func MimeType

func MimeType(hdr []byte) string

Returns the emptry string if unknown.

func MimeTypeFromReader

func MimeTypeFromReader(r io.Reader) (mime string, reader io.Reader)

MimeTypeFromReader takes a reader, sniffs the beginning of it, and returns the mime (if sniffed, else "") and a new reader that's the concatenation of the bytes sniffed and the remaining reader.

Types

This section is empty.

Jump to

Keyboard shortcuts

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