rjeczalik / notify

File system event notification library on steroids.
MIT License
900 stars 128 forks source link

Fix Darwin build without Cgo #182

Closed tie closed 3 years ago

tie commented 5 years ago

Either cross-compiling or explicit CGO_ENABLED=0:

GOOS=darwin go build

Expected output: builds without an error Actual output:

# github.com/rjeczalik/notify
./watcher_fsevents.go:49:11: undefined: stream

This PR addresses this issue by adding a fallback to kqueue on darwin,!cgo and enabling fsevents only for darwin,!kqueue,cgo.

dvaldivia commented 4 years ago

This looks great, when can this get merged?

rjeczalik commented 3 years ago

Thanks @tie for the PR!