Cases to consider:
func (c *Cmd) Output() ([]byte, error) & func (c *Cmd) CombinedOutput() ([]byte, error)
cmd.Stdout = os.Stdout
r, cmd.Stdout, err := os.Pipe()
func (c *Cmd) StdoutPipe() (io.ReadCloser, error)
Cover it with tests if possible, e.g. run worker in a Docker container with memory limit set to 32MB.