feat: read from std in
This commit is contained in:
@@ -20,6 +20,11 @@ func main() {
|
||||
logger.Info("Using program arguments.", "args", os.Args)
|
||||
logger.Info("Parsed CLI options.", "options", options)
|
||||
|
||||
if options.Input == "-" {
|
||||
options.Input, err = cli.ReadInput()
|
||||
cli.HandleError(err)
|
||||
}
|
||||
|
||||
tokens, fails := tokenizer.GetTokens([]rune(options.Input))
|
||||
if len(fails) > 0 {
|
||||
cli.HandleError(errors.Join(fails...))
|
||||
|
||||
Reference in New Issue
Block a user