gohook/README.md

28 lines
749 B
Markdown
Raw Normal View History

2017-02-06 16:55:01 +08:00
# gohook
2019-02-19 22:34:55 +08:00
[![CircleCI Status](https://circleci.com/gh/robotn/gohook.svg?style=shield)](https://circleci.com/gh/robotn/gohook)
![Appveyor](https://ci.appveyor.com/api/projects/status/github/robotn/gohook?branch=master&svg=true)
[![Go Report Card](https://goreportcard.com/badge/github.com/robotn/gohook)](https://goreportcard.com/report/github.com/robotn/gohook)
[![GoDoc](https://godoc.org/github.com/robotn/gohook?status.svg)](https://godoc.org/github.com/robotn/gohook)
2018-09-18 02:09:59 +08:00
<!-- This is a work in progress. -->
2018-09-05 03:25:08 +08:00
```Go
package main
import (
"fmt"
2019-02-19 22:34:55 +08:00
"github.com/robotn/gohook"
2018-09-05 03:25:08 +08:00
)
func main() {
EvChan := hook.Start()
defer hook.End()
2019-02-19 23:32:48 +08:00
for ev := range EvChan {
fmt.Println(ev)
2018-09-05 03:25:08 +08:00
}
}
2019-02-19 22:34:55 +08:00
```
Based on [libuiohook](https://github.com/kwhat/libuiohook).