pkg / browser

Package browser provides helpers to open files, readers, and urls in a browser window.
BSD 2-Clause "Simplified" License
559 stars 99 forks source link

Add functional options to allow configuring the underlying Cmd #30

Open landism opened 3 years ago

landism commented 3 years ago

Problem

browser exposes the Stdout and Stderr vars for consuming packages to control where its output goes. This global state serves most purposes, but doesn't suffice if a project wants different output destinations for different OpenURL calls.

Solution

Add options to the Open* functions to allow the user to configure the command's stdout and stderr.

Notes