{"id":49931,"library":"inconshreveable-mousetrap","title":"Mousetrap","description":"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.","status":"active","version":"1.1.0","language":"go","source_language":null,"source_url":"https://github.com/inconshreveable/mousetrap","tags":["windows","gui","console","detection"],"install":[{"cmd":"go get github.com/inconshreveable/mousetrap","lang":"bash","label":"Install github.com/inconshreveable/mousetrap"}],"dependencies":[],"imports":[{"symbol":"mousetrap","correct":"github.com/inconshreveable/mousetrap"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/inconshreveable/mousetrap\"\n)\n\nfunc main() {\n\tif mousetrap.StartedByExplorer() {\n\t\tfmt.Println(\"Started from Windows GUI\")\n\t}\n}","lang":"go","description":"Detect if the program was started by double-clicking in Windows Explorer."},"warnings":[],"env_vars":null,"search_vec":"'click':22 'consol':30,34 'detect':8,35 'doubl':21 'double-click':20 'go':11 'gui':18,33 'i.e':19 'librari':6 'mousetrap':1,2 'program':12 'provid':24 'show':28 'start':14 'tini':5 'window':17,31,32 'workaround':26","created_at":"2026-06-15T04:33:39.160050+00:00","updated_at":"2026-06-15T04:33:39.160050+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/inconshreveable/mousetrap","github":"https://github.com/inconshreveable/mousetrap","docs":"https://pkg.go.dev/github.com/inconshreveable/mousetrap#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}