package
0.0.0-20241002152705-73f2ae41cd93
Repository: https://github.com/jzelinskie/faq.git
Documentation: pkg.go.dev
# Functions
DetermineEncoding returns an Encoding based on a file format and an input file if input format is "auto".
ExecuteProgram takes input, a single JSON value, and runs program via libjq against it, returning the results.
NewFile returns a FileInfo from a given path and io.ReadCloser.
OpenFile returns a new FileInfo.
ProcessEachFile takes a list of files, and for each, attempts to convert it to a JSON value and runs ExecuteProgram against each.
ProcessInput takes input, a single JSON value, and runs program via libjq against it, writing the results to outputWriter.
SlurpAllFiles takes a list of files, and for each, attempts to convert it to a JSON value and appends each JSON value to an array, and passes that array as the input ExecuteProgram.
# Structs
FileInfo is a file that is read lazily from an io.Reader and caches the file bytes for future reads.
OutputConfig contains configuration for out to print out values.
ProgramArguments contains the arguments to a JQ program.
# Interfaces
File is the interface that faq uses to read file contents, and get access to their path for file type detection.