mimemagic

package
v97.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2017 License: Apache-2.0, MIT Imports: 1 Imported by: 0

README

Mimemagic - Detect mime-types in Go

import "bitbucket.org/taruti/mimemagic"

Import the library

mimemagic.Match(myguess string, startoffile []byte) string

The API:

  • myguess is a guess of the mimetype that is checked first before other types are checked. It may also be "".
  • startoffile contains the beginning of the file - e.g. giving it 1024 bytes from the start of the file works fine.
  • the result is the guessed mimetype or "" if not known.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(guess string, dat []byte) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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