summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xservice/reload/213977608/file.txt0
-rwxr-xr-xservice/reload/423382903/file.txt0
-rw-r--r--service/reload/watcher.go11
-rw-r--r--worker.go2
4 files changed, 2 insertions, 11 deletions
diff --git a/service/reload/213977608/file.txt b/service/reload/213977608/file.txt
new file mode 100755
index 00000000..e69de29b
--- /dev/null
+++ b/service/reload/213977608/file.txt
diff --git a/service/reload/423382903/file.txt b/service/reload/423382903/file.txt
new file mode 100755
index 00000000..e69de29b
--- /dev/null
+++ b/service/reload/423382903/file.txt
diff --git a/service/reload/watcher.go b/service/reload/watcher.go
index 027d2d0d..721495c3 100644
--- a/service/reload/watcher.go
+++ b/service/reload/watcher.go
@@ -177,15 +177,6 @@ func (w *Watcher) retrieveFilesSingle(serviceName, path string) (map[string]os.F
// so, we will add files with goto pattern
outer:
for i := 0; i < len(fileInfoList); i++ {
- var pathToFile string
- // BCE check elimination
- // https://go101.org/article/bounds-check-elimination.html
- if len(fileInfoList) != 0 && len(fileInfoList) >= i {
- pathToFile = filepath.Join(pathToFile, fileInfoList[i].Name())
- } else {
- return nil, errors.New("file info list len")
- }
-
// if file in ignored --> continue
if _, ignored := w.watcherConfigs[serviceName].ignored[path]; ignored {
continue
@@ -199,7 +190,7 @@ outer:
}
}
- filesList[pathToFile] = fileInfoList[i]
+ filesList[fileInfoList[i].Name()] = fileInfoList[i]
}
return filesList, nil
diff --git a/worker.go b/worker.go
index 3740aee8..4fbf4369 100644
--- a/worker.go
+++ b/worker.go
@@ -250,7 +250,7 @@ func (w *Worker) execPayload(rqs *Payload) (rsp *Payload, err error) {
}
// add streaming support :)
- if rsp.Body, pr, err = w.rl.Receive(); err != nil {
+ if rsp.Body, _, err = w.rl.Receive(); err != nil {
return nil, errors.Wrap(err, "worker error")
}