mirror of
https://github.com/beego/bee.git
synced 2024-11-21 18:40:54 +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() {
|
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 {
|
||||||
@ -148,7 +148,7 @@ func AutoBuild(files []string, isgenerate bool) {
|
|||||||
}
|
}
|
||||||
appName := appname
|
appName := appname
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
appName += ".exe"
|
appName += ".exe"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user