Skip to content

Latest commit

 

History

History

typedetect

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

typedetect

typedetect is a trivial program that reads input from stdin or a specified file, attempts to determine its file type (json and xml are supported), and prints the file type, and a preview (head and tail) of the file contents. It demonstrates use of the neilotoole/streamcache Go package.

Usage

$ go install github.com/neilotoole/streamcache/examples/typedetect

$ typedetect testdata/data.json
# Or:
$ cat testdata/data.xml | typedetect

streamcache_typedetect.png