Skip to content

Commit 21f2655

Browse files
author
Mike Bland
committed
Fix unsupported WatchForUpdates and build tags
Closes bitly#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.
1 parent c694689 commit 21f2655

4 files changed

+5
-9
lines changed

validator_watcher_copy_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// +build go1.3
2-
// +build !plan9,!solaris,!windows
1+
// +build go1.3,!plan9,!solaris,!windows
32

43
// Turns out you can't copy over an existing file on Windows.
54

validator_watcher_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// +build go1.3
2-
// +build !plan9,!solaris
1+
// +build go1.3,!plan9,!solaris
32

43
package main
54

watcher.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// +build go1.3
2-
// +build !plan9,!solaris
1+
// +build go1.3,!plan9,!solaris
32

43
package main
54

watcher_unsupported.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
// +build go1.1
2-
// +build plan9,solaris
1+
// +build !go1.3 plan9 solaris
32

43
package main
54

65
import (
76
"log"
87
)
98

10-
func WatchForUpdates(filename string, action func()) bool {
9+
func WatchForUpdates(filename string, done <-chan bool, action func()) bool {
1110
log.Printf("file watching not implemented on this platform")
1211
return false
1312
}

0 commit comments

Comments
 (0)