Skip to content

Commit

Permalink
Add logfmt file extension (#286)
Browse files Browse the repository at this point in the history
* Fix

* Add .logfmt to supported file extensions

* Add .logfmt to supported file extensions

* Add missing case in TransformReader
  • Loading branch information
0michalsokolowski0 committed Jul 24, 2022
1 parent 3362433 commit 80df02b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runner/file.go
Expand Up @@ -631,6 +631,8 @@ func GetMimeType(fileName string, ct ContentTypeInfo) MimeType {
return AvroMimeType
case ".yaml", ".yml":
return YAMLMimeType
case ".logfmt":
return LogFmtMimeType
}

return UnknownMimeType
Expand Down
2 changes: 2 additions & 0 deletions runner/http.go
Expand Up @@ -318,6 +318,8 @@ func TransformReader(r *bufio.Reader, fileName string, cti ContentTypeInfo, out
return edse(err)
}
return transformOpenOfficeSheet(oor, out)
case LogFmtMimeType:
return transformLogFmtFile(fileName, out)
}

if re, ok := BUILTIN_REGEX[assumedType]; ok {
Expand Down

0 comments on commit 80df02b

Please sign in to comment.