...

Text file src/github.com/inconshreveable/mousetrap/README.md

Documentation: github.com/inconshreveable/mousetrap

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

View as plain text