I have a large buffer (buffer []byte) that I would like to print to stdout but pipe through a pager like less or more. Kind of like the man command. I don't want to write the buffer to tmp file first or make the user manually pipe the output to a pager on the command line.
I can find examples of how to pipe the output of one command to another, but nothing starting with an internal buffer.
Any ideas? Thanks.