1
0
mirror of https://github.com/beego/bee.git synced 2024-11-24 23:30:55 +00:00

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:03:58 +07:00
parent 79d6746aa2
commit d24c05d83e

View File

@ -85,7 +85,7 @@ func NewWatcher(paths []string, files []string, isgenerate bool) {
go func() { go func() {
// Wait 1s before autobuild until there is no file change. // Wait 1s before autobuild until there is no file change.
scheduleTime = time.Now().Add(1 * time.Second) scheduleTime = time.Now().Add(1 * time.Second)
time.Sleep(scheduleTime.Sub(time.Now())) time.Until(scheduleTime)
AutoBuild(files, isgenerate) AutoBuild(files, isgenerate)
if config.Conf.EnableReload { if config.Conf.EnableReload {