Hacker News new | past | comments | ask | show | jobs | submit login

Pardon my ignorance but if fsnotify is not available how is Hugo (static site generator) listening for events in the filesystem (to reload the server)



Looking at Hugo's dependencies, the copy on my machine (possibly outdated) uses this library: https://github.com/howeyc/fsnotify

However, there's a moving notice on that page for this repo: https://github.com/go-fsnotify/fsnotify

Fsnotify will probably make it into the standard library or other core golang repository at some point, given that it could help speed up the compiler. However there's nothing particularly mystical about it that prevents a 3rd party library from being just as good.


fsnotify is not available in the go standard library, but you can still use it like any other third party library (e.g.: go get)


By using platform-specific cgo calls.


Probably unimportant for the asker, but go-fsnotify uses syscalls, not cgo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: