xfile

package
v0.0.0-...-71f12ce Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = 1
	KB = 1024 * B
	MB = 1024 * KB
	GB = 1024 * MB
)

Variables

This section is empty.

Functions

func CalcFileHexMD5

func CalcFileHexMD5(file io.ReadSeeker) (string, error)

func FileIsImage

func FileIsImage(file io.ReadSeeker) (bool, error)

func GetFileMIME

func GetFileMIME(file io.ReadSeeker) (string, error)

GetFileMIME return file mime type: https://mimesniff.spec.whatwg.org/

func GetFileMIMEType

func GetFileMIMEType(file io.ReadSeeker) (*mimetype.MIME, error)

func MIMEIsImage

func MIMEIsImage(mime string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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