Skip to content

Commit

Permalink
readme: Simplify event handler creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mtyurt committed Sep 10, 2018
1 parent f57e7f3 commit 775af06
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ import (
)

func main() {
handler := eventhandler.EventHandler{}
handler := eventhandler.New()

handler.HandleEvent("PROCESS_STATE", func(header eventhandler.HeaderTokens, payload map[string]string) {

fmt.Fprintf(os.Stderr, "event: %s, payload: %v\n", header.EventName, payload)

})
handler.Start()
}
Expand Down

0 comments on commit 775af06

Please sign in to comment.