Help us shape the future of Go! Take the 2026 Go Developer Survey

classifier

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeImage      = "Image"
	TypeVideo      = "Video"
	TypeAudio      = "Audio"
	TypeDocument   = "Document"
	TypeArchive    = "Archive"
	TypeExecutable = "Executable"
	TypeCode       = "Code"
	TypeOther      = "Other"
)

Categories

Variables

This section is empty.

Functions

func CategoryFromMIME

func CategoryFromMIME(mime string) string

CategoryFromMIME maps common MIME types into CHEST categories

func ClassifyExtension

func ClassifyExtension(ext string) string

ClassifyExtension returns high-level Category name for extension (e.g. "mp4" -> "Video")

func ClassifyFilename

func ClassifyFilename(filename string) string

ClassifyFilename returns high-level Category name for filename

func SniffMIME

func SniffMIME(filePath string) string

SniffMIME reads up to 512 bytes of a file to detect its actual MIME content type

Types

This section is empty.

Jump to

Keyboard shortcuts

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