Registry / utility / inconshreveable-mousetrap

inconshreveable-mousetrap

JSON →
library1.1.0gogounverified

Mousetrap is a tiny library that detects when a Go program is started from a Windows GUI (i.e., double-clicked) and provides a workaround to show a console window.

go get github.com/inconshreveable/mousetrap
INSTALL
IMPORT
SIG · INCONSHREVEABLE-MO
I
inconshreveable-mousetrap
utilitygov1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mousetrap
github.com/inconshreveable/mousetrap

Detect if the program was started by double-clicking in Windows Explorer.

package main import ( "fmt" "github.com/inconshreveable/mousetrap" ) func main() { if mousetrap.StartedByExplorer() { fmt.Println("Started from Windows GUI") } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
inconshreveable-mousetrap — go get inconshreveable-mousetrap · libregistry