Skip to content

Commit 9769bc4

Browse files
committed
Return watcher error
1 parent e8b9a32 commit 9769bc4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/libs/util/watcher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func watchFileForUpdates(filename string, done <-chan bool, action func()) error
5454
filename = filepath.Clean(filename)
5555
watcher, err := fsnotify.NewWatcher()
5656
if err != nil {
57-
errors.Wrapf(err, "failed to create watcher for %s", filename)
57+
return errors.Wrapf(err, "failed to create watcher for %s", filename)
5858
}
5959
go func() {
6060
defer func() {
@@ -98,7 +98,7 @@ func watchLinkForUpdates(filename string, done <-chan bool, action func()) error
9898
dirname := filepath.Dir(filename)
9999
watcher, err := fsnotify.NewWatcher()
100100
if err != nil {
101-
errors.Wrapf(err, "failed to create watcher for file %s in dir %s", filename, dirname)
101+
return errors.Wrapf(err, "failed to create watcher for file %s in dir %s", filename, dirname)
102102
}
103103
go func() {
104104
defer func() {

proxy/util_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ func makeTLSHttpProxyPipe(conf *config.Config, proxyusername, proxypassword stri
260260
return nil, nil, nil, err
261261
}
262262
// Start a connection between two endpoints.
263-
var err0, err1, err2 error
263+
var err1, err2 error
264264
go func() {
265-
err0 = http.Serve(proxy, server)
265+
http.Serve(proxy, server)
266266
}()
267267
done := make(chan bool)
268268
go func() {

0 commit comments

Comments
 (0)