mirror of
https://github.com/beego/bee.git
synced 2024-12-22 10:00:50 +00:00
Fix staticcheck failed - should use time.Until instead of t.Sub(time.Now()) (S1024)
This commit is contained in:
parent
79d6746aa2
commit
d24c05d83e
@ -85,7 +85,7 @@ func NewWatcher(paths []string, files []string, isgenerate bool) {
|
||||
go func() {
|
||||
// Wait 1s before autobuild until there is no file change.
|
||||
scheduleTime = time.Now().Add(1 * time.Second)
|
||||
time.Sleep(scheduleTime.Sub(time.Now()))
|
||||
time.Until(scheduleTime)
|
||||
AutoBuild(files, isgenerate)
|
||||
|
||||
if config.Conf.EnableReload {
|
||||
@ -148,7 +148,7 @@ func AutoBuild(files []string, isgenerate bool) {
|
||||
}
|
||||
appName := appname
|
||||
if err == nil {
|
||||
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
appName += ".exe"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user