diff options
| author | joesis | 2017-06-20 12:09:15 +0800 | 
|---|---|---|
| committer | joesis | 2017-06-20 13:52:11 +0800 | 
| commit | 64fc593b2f0f930014b8a8a0631f73ba6d00eed2 (patch) | |
| tree | 2ca69b25dbba989d6d7699f60e21fc2168890b2f /example/main.go | |
| parent | 8a840534343d8d7c863b876ed6ba3856e560c610 (diff) | |
| download | systray-64fc593b2f0f930014b8a8a0631f73ba6d00eed2.tar.bz2 | |
update example
Diffstat (limited to 'example/main.go')
| -rw-r--r-- | example/main.go | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/example/main.go b/example/main.go index 01b9ee8..46604d5 100644 --- a/example/main.go +++ b/example/main.go @@ -2,6 +2,8 @@ package main  import (  	"fmt" +	"os" +  	"github.com/getlantern/systray"  	"github.com/getlantern/systray/example/icon"  	"github.com/skratchdot/open-golang/open" @@ -9,7 +11,7 @@ import (  func main() {  	// Should be called at the very beginning of main(). -	systray.Run(onReady) +	systray.Run(onReady, onExit)  }  func onReady() { @@ -59,3 +61,9 @@ func onReady() {  		}  	}()  } + +func onExit() { +	file, _ := os.Create("out.txt") +	defer file.Close() +	file.Write([]byte("On Exit...")) +} | 
