add tests for fswatcher package

This commit is contained in:
Dominic Breuker
2018-02-27 09:56:05 +01:00
parent d38cb18712
commit a2dfb51d51
14 changed files with 277 additions and 199 deletions

View File

@@ -1,11 +1,10 @@
package fswatcher
import (
"github.com/dominicbreuker/pspy/internal/fswatcher/inotify"
"golang.org/x/sys/unix"
)
func Observe(i *inotify.Inotify, triggerCh chan struct{}, dataCh chan []byte, errCh chan error) {
func Observe(i Inotify, triggerCh chan struct{}, dataCh chan []byte, errCh chan error) {
buf := make([]byte, 5*unix.SizeofInotifyEvent)
for {