Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Again, the answer was 'use pipes' and the following reference was given as an example: https://github.com/boz/ephemerald/blob/master/lifecycle/action_exec.go#L130-L163
Again, the solution involves pipes. There is not much further elaboration on the answer, except for the tip that you can reuse io.Reader/io.Writer intended to be used as pipes for other purposes, and vice-versa: any package that uses io.Reader/io.Writer can also read and write from stdin/stdout pipes.
The answer, once more, is to 'use pipes' and to take a look at this code. Unfortunately, that's for Windows only, which I'm most definitely not using...
I've also searched GitHub for working examples of similar solutions. Here is one, which I believe to have come across on StackOverflow https://github.com/HeavyHorst/remco/blob/89b372b597e621cf0934ffbb313d7abe9e96fc26/pkg/template/executor.go