MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / DetectByExtension

Function DetectByExtension

internal/files/files.go:175–178  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

173}
174
175func DetectByExtension(filename string) string {
176 ext := strings.ToLower(filepath.Ext(filename))
177 return mime.TypeByExtension(ext)
178}
179
180func DetectByContent(data []byte) (string, error) {
181 mimeType := http.DetectContentType(data)

Callers 1

DetectFileTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected