3 mousetrap is a tiny library that answers a single question.
5 On a Windows machine, was the process invoked by someone double clicking on
6 the executable file while browsing in explorer?
10 Windows developers unfamiliar with command line tools will often "double-click"
11 the executable for a tool. Because most CLI tools print the help and then exit
12 when invoked without arguments, this is often very frustrating for those users.
14 mousetrap provides a way to detect these invocations so that you can provide
15 more helpful behavior and instructions on how to run the CLI tool. To see what
16 this looks like, both from an organizational and a technical perspective, see
17 https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/
21 The library exposes a single interface:
23 func StartedByExplorer() (bool)