From ac9abc018ec19b86506a8a55f905c197b5237f19 Mon Sep 17 00:00:00 2001 From: yanue Date: Fri, 9 Jul 2021 18:37:41 +0800 Subject: [PATCH] nolint:funlen --- gowatch.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gowatch.go b/gowatch.go index d8fb217..af89638 100644 --- a/gowatch.go +++ b/gowatch.go @@ -9,7 +9,6 @@ import ( "regexp" "sort" "strings" - "sync" "time" "github.com/howeyc/fsnotify" @@ -19,7 +18,6 @@ import ( var ( cmd *exec.Cmd - state sync.Mutex eventTime = make(map[string]int64) scheduleTime time.Time ) @@ -108,6 +106,7 @@ func getFileModTime(path string) int64 { var building bool // Autobuild auto build +// nolint:funlen func Autobuild(files []string) { if building { log.Infof("still in building...\n") @@ -117,8 +116,6 @@ func Autobuild(files []string) { defer func() { building = false }() - state.Lock() - defer state.Unlock() log.Infof("Start building...\n")