Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileOrStdin ¶
func FileOrStdin(stdin io.ReadCloser, path string) (io.ReadCloser, bool, error)
FileOrStdin opens the file at the given path for reading. If the path is "-", stdin is returned instead.
It's the caller's responsibility to close the returned ReadCloser (usually with `defer`).
Returns a boolean indicating whether stdin is being used. If true, no other components of the calling program should attempt to read from stdin for anything else.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.