I believe Daniel Martí plans to make gogrep usable as a library, so it will be possible to write such Go programs in the future.