From 21f265528074690eaa287037b5d41066b5cb4dcf Mon Sep 17 00:00:00 2001 From: Mike Bland Date: Sat, 30 May 2015 13:44:18 -0400 Subject: [PATCH] Fix unsupported WatchForUpdates and build tags Closes #105. The `go1.1` constraint has been updated to `!go1.3` per https://golang.org/pkg/go/build/#hdr-Build_Constraints and https://github.com/go-fsnotify/fsnotify. Also, the existing call signature for `WatchForUpdates()` in `watcher_unsupported.go` was stale. --- validator_watcher_copy_test.go | 3 +-- validator_watcher_test.go | 3 +-- watcher.go | 3 +-- watcher_unsupported.go | 5 ++--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/validator_watcher_copy_test.go b/validator_watcher_copy_test.go index fa04cb9..68c4cb7 100644 --- a/validator_watcher_copy_test.go +++ b/validator_watcher_copy_test.go @@ -1,5 +1,4 @@ -// +build go1.3 -// +build !plan9,!solaris,!windows +// +build go1.3,!plan9,!solaris,!windows // Turns out you can't copy over an existing file on Windows. diff --git a/validator_watcher_test.go b/validator_watcher_test.go index f220ea2..70eaa10 100644 --- a/validator_watcher_test.go +++ b/validator_watcher_test.go @@ -1,5 +1,4 @@ -// +build go1.3 -// +build !plan9,!solaris +// +build go1.3,!plan9,!solaris package main diff --git a/watcher.go b/watcher.go index d8e073f..fa8f03f 100644 --- a/watcher.go +++ b/watcher.go @@ -1,5 +1,4 @@ -// +build go1.3 -// +build !plan9,!solaris +// +build go1.3,!plan9,!solaris package main diff --git a/watcher_unsupported.go b/watcher_unsupported.go index d94e11e..d65c863 100644 --- a/watcher_unsupported.go +++ b/watcher_unsupported.go @@ -1,5 +1,4 @@ -// +build go1.1 -// +build plan9,solaris +// +build !go1.3 plan9 solaris package main @@ -7,7 +6,7 @@ import ( "log" ) -func WatchForUpdates(filename string, action func()) bool { +func WatchForUpdates(filename string, done <-chan bool, action func()) bool { log.Printf("file watching not implemented on this platform") return false }