Fix staticcheck failed - should use time.Until instead of t.Sub(time.Now()) (S1024)

This commit is contained in:
Tavee Khunbida 2019-01-08 01:02:14 +07:00
parent 19be52dc8c
commit 79d6746aa2
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ func startWatcher(paths []string, ch chan int) {
// Wait 1s before re-build until there is no file change
scheduleTime := time.Now().Add(1 * time.Second)
time.Sleep(scheduleTime.Sub(time.Now()))
time.Until(scheduleTime)
_, err := buildDebug()
if err != nil {
utils.Notify("Build Failed: "+err.Error(), "bee")