3 ms·
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)
by krat0sprakhar 12y ago
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)
- deleted 12y ago[deleted]
- mischanix 12y agoBy using platform-specific cgo calls.
- regecks 12y agoProbably unimportant for the asker, but go-fsnotify uses syscalls, not cgo.
- Laremere 12y agoLooking at Hugo's dependencies, the copy on my machine (possibly outdated) uses this library: https://github.com/howeyc/fsnotify https://github.com/howeyc/fsnotify However, there's a moving notice on that page for this repo: https://github.com/go-fsnotify/fsnotify 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.
- vially 12y agofsnotify is not available in the go standard library, but you can still use it like any other third party library (e.g.: go get)