Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just to make sure I'm not missing it: fsnotify didn't make it into Go 1.4, right? 1.5 maybe? :)


It didn't make it in, but there's no real strong moves for it to be in the standard library anyway. It works well enough in a go-gettable package.


The original motivation for putting it into the standard library is so the 'go' command can use it, to watch the filesystem and know what needs to be rebuilt before you even run "go install" or "go build".


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: