detect

package
v0.0.0-...-58bc41f Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package detect provides logic for reading input and detecting MIME types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MIMEFromContent

func MIMEFromContent(data []byte) string

MIMEFromContent returns the MIME type detected from the given data.

func MIMEFromExtension

func MIMEFromExtension(filename string) string

MIMEFromExtension returns the MIME type based on the file extension.

func ReadInput

func ReadInput(target string) ([]byte, string, error)

ReadInput reads data from stdin, a file, or a URL.

Types

This section is empty.