aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index b4f2c1a..c6d1130 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Tested on Windows 8, Mac OSX, Ubuntu 14.10 and Debian 7.6.
```go
func main() {
// Should be called at the very beginning of main().
- systray.Run(onReady)
+ systray.Run(onReady, onExit)
}
func onReady() {
@@ -14,6 +14,10 @@ func onReady() {
systray.SetTooltip("Pretty awesome超级棒")
mQuit := systray.AddMenuItem("Quit", "Quit the whole app")
}
+
+func onExit() {
+ // clean up here
+}
```
Menu item can be checked and / or disabled. Methods except `Run()` can be invoked from any goroutine. See demo code under `example` folder.