I have a tool that acts as a pipe, it reads data from stdin and writes go source code to stdout.
Is it possible to setup input/output redirection and use such tool with go:generate? Something like:
//go:generate tool < file.txt > file.go
I figured out how to do it:
//go:generate sh -c "tool < file.txt > file.go"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With