It's tempting to do something like gow run main.go < input.txt, but this will effectively run the application with that input once, and then basically freeze because the application is waiting for input but no more is coming.
gow (or some underlying library it uses) seemingly already detects that input is not a TTY, since it logs [gow] unable to read terminal state: inappropriate ioctl for device; it would be nice if it could in this case instead consume all of STDIN and store it, and then send it to the program on every invocation. If it can't detect it automatically, it could also be controlled with a flag, e.g. gow -T (for no-TTY; a lot of the good letters are already taken...).
If there's some other usage pattern that will allow me to do effectively the same thing, that'd be nice to document too! Currently I'm stuck with one terminal running gow -c build -o bin/my-app main.go and another ls bin/ | entr -rc sh -c 'bin/my-app < input.txt' which is just annoying... :)
It's tempting to do something like
gow run main.go < input.txt, but this will effectively run the application with that input once, and then basically freeze because the application is waiting for input but no more is coming.gow(or some underlying library it uses) seemingly already detects that input is not a TTY, since it logs[gow] unable to read terminal state: inappropriate ioctl for device; it would be nice if it could in this case instead consume all of STDIN and store it, and then send it to the program on every invocation. If it can't detect it automatically, it could also be controlled with a flag, e.g.gow -T(forno-TTY; a lot of the good letters are already taken...).If there's some other usage pattern that will allow me to do effectively the same thing, that'd be nice to document too! Currently I'm stuck with one terminal running
gow -c build -o bin/my-app main.goand anotherls bin/ | entr -rc sh -c 'bin/my-app < input.txt'which is just annoying... :)