Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inconshreveable/mousetrap
Detect starting from Windows explorer
https://github.com/inconshreveable/mousetrap
Last synced: about 16 hours ago
JSON representation
Detect starting from Windows explorer
- Host: GitHub
- URL: https://github.com/inconshreveable/mousetrap
- Owner: inconshreveable
- License: apache-2.0
- Created: 2014-04-25T08:06:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-11-29T17:47:50.000Z (about 2 years ago)
- Last Synced: 2025-01-03T07:11:59.918Z (8 days ago)
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 245
- Watchers: 5
- Forks: 34
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - inconshreveable/mousetrap - Detect starting from Windows explorer (Go)
README
# mousetrap
mousetrap is a tiny library that answers a single question.
On a Windows machine, was the process invoked by someone double clicking on
the executable file while browsing in explorer?### Motivation
Windows developers unfamiliar with command line tools will often "double-click"
the executable for a tool. Because most CLI tools print the help and then exit
when invoked without arguments, this is often very frustrating for those users.mousetrap provides a way to detect these invocations so that you can provide
more helpful behavior and instructions on how to run the CLI tool. To see what
this looks like, both from an organizational and a technical perspective, see
https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/### The interface
The library exposes a single interface:
func StartedByExplorer() (bool)