Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for addedChan (0.08 sec)

  1. pkg/filewatcher/fakefilewatcher_test.go

    package filewatcher
    
    import (
    	"fmt"
    	"testing"
    
    	"github.com/fsnotify/fsnotify"
    )
    
    func TestFakeFileWatcher(t *testing.T) {
    	addedChan := make(chan string, 10)
    	removedChan := make(chan string, 10)
    
    	changed := func(path string, added bool) {
    		if added {
    			addedChan <- path
    		} else {
    			removedChan <- path
    		}
    	}
    
    	newWatcher, fakeWatcher := NewFakeWatcher(changed)
    	watcher := newWatcher()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 3.8K bytes
    - Viewed (0)
Back to top