Also supports streaming input from stdin and removes the requirement for
of passing any files to faq, defaulting to stdin if no file args are
specified.
I removed the usage of linguist because it's not really helping and I felt my custom code to detect xml/yaml/json is sufficient, along with the existing filename extension based detection. We could continue to use linguist, but it would mean we need to read a lot more of the file's contents (maybe all of it?) and pass those contents to lingust, which makes things complicated since the bufio.Reader buffer is of limited length.
Okay, I fixed the review comments and added back linguist detection. I rebased on top of #62 because I found a bug in decoding logic while handling this and wanted to fix that independently of this PR.
Also supports streaming input from stdin and removes the requirement for of passing any files to faq, defaulting to stdin if no file args are specified.
I removed the usage of linguist because it's not really helping and I felt my custom code to detect xml/yaml/json is sufficient, along with the existing filename extension based detection. We could continue to use linguist, but it would mean we need to read a lot more of the file's contents (maybe all of it?) and pass those contents to lingust, which makes things complicated since the bufio.Reader buffer is of limited length.