update go hook example docs

This commit is contained in:
vcaesar 2019-10-10 13:11:32 -04:00
parent 221bcb3991
commit 4f5b3ead12

View File

@ -3,9 +3,10 @@ package main
import ( import (
"fmt" "fmt"
"github.com/robotn/gohook" hook "github.com/robotn/gohook"
) )
// hook listen and return values using detailed examples
func add() { func add() {
s := hook.Start() s := hook.Start()
defer hook.End() defer hook.End()
@ -24,6 +25,7 @@ func add() {
} }
} }
// base hook example
func base() { func base() {
EvChan := hook.Start() EvChan := hook.Start()
defer hook.End() defer hook.End()