StringReaderFromCmdArgs returns a string reader for reading the arguments passed in the command line. If the arguments consists in single hypen "-", they are read from stdin.
(args []string)
| 126 | // passed in the command line. If the arguments consists in single hypen "-", |
| 127 | // they are read from stdin. |
| 128 | func StringReaderFromCmdArgs(args []string) StringReader { |
| 129 | if len(args) == 1 && args[0] == "-" { |
| 130 | return NewStringIOReader(os.Stdin) |
| 131 | } else { |
| 132 | return NewStringArrayReader(args) |
| 133 | } |
| 134 | } |
no test coverage detected