-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from imsodin/panicKqueue
kqueue: Don't panic when an error occurs on init (fixes #149)
- Loading branch information
Showing
3 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2014-2018 The Notify Authors. All rights reserved. | ||
// Use of this source code is governed by the MIT license that can be | ||
// found in the LICENSE file. | ||
|
||
// +build !darwin,!linux,!freebsd,!dragonfly,!netbsd,!openbsd,!windows | ||
// +build !kqueue,!solaris | ||
|
||
package notify | ||
|
||
import "errors" | ||
|
||
// newWatcher stub. | ||
func newWatcher(chan<- EventInfo) watcher { | ||
return watcherStub{errors.New("notify: not implemented")} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
// Copyright (c) 2014-2015 The Notify Authors. All rights reserved. | ||
// Copyright (c) 2014-2018 The Notify Authors. All rights reserved. | ||
// Use of this source code is governed by the MIT license that can be | ||
// found in the LICENSE file. | ||
|
||
// +build !darwin,!linux,!freebsd,!dragonfly,!netbsd,!openbsd,!windows | ||
// +build !kqueue,!solaris | ||
|
||
package notify | ||
|
||
import "errors" | ||
|
||
type stub struct{ error } | ||
|
||
// newWatcher stub. | ||
func newWatcher(chan<- EventInfo) watcher { | ||
return stub{errors.New("notify: not implemented")} | ||
} | ||
type watcherStub struct{ error } | ||
|
||
// Following methods implement notify.watcher interface. | ||
func (s stub) Watch(string, Event) error { return s } | ||
func (s stub) Rewatch(string, Event, Event) error { return s } | ||
func (s stub) Unwatch(string) (err error) { return s } | ||
func (s stub) Close() error { return s } | ||
func (s watcherStub) Watch(string, Event) error { return s } | ||
func (s watcherStub) Rewatch(string, Event, Event) error { return s } | ||
func (s watcherStub) Unwatch(string) (err error) { return s } | ||
func (s watcherStub) Close() error { return s } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters