Skip to content

Commit a3a04e6

Browse files
Specify that there is no buffering done when reading inputs
for #479
1 parent f8b7d47 commit a3a04e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mimetype.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func EqualsAny(s string, mimes ...string) bool {
103103
// SetLimit sets the maximum number of bytes read from input when detecting the MIME type.
104104
// Increasing the limit provides better detection for file formats which store
105105
// their magical numbers towards the end of the file: docx, pptx, xlsx, etc.
106+
// During detection data is read in a single block of size limit, i.e. it is not buffered.
106107
// A limit of 0 means the whole input file will be used.
107108
func SetLimit(limit uint32) {
108109
// Using atomic because readLimit can be read at the same time in other goroutine.

0 commit comments

Comments
 (0)