From df0fb8595be358bec54604f9242d7cdbdc63eac9 Mon Sep 17 00:00:00 2001 From: ssx Date: Sat, 6 Jul 2013 16:23:35 +0800 Subject: [PATCH] remove useless codes again --- watch.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/watch.go b/watch.go index ef581ad..3188777 100644 --- a/watch.go +++ b/watch.go @@ -6,13 +6,11 @@ import ( "log" "os" "os/exec" - "runtime" "sync" "time" ) var ( - restart chan bool cmd *exec.Cmd state sync.Mutex eventTime = make(map[string]time.Time) @@ -60,19 +58,7 @@ func NewWatcher(paths []string) { func Autobuild() { state.Lock() defer state.Unlock() - defer func() { - if err := recover(); err != nil { - str := "" - for i := 1; ; i += 1 { - _, file, line, ok := runtime.Caller(i) - if !ok { - break - } - str = str + fmt.Sprintf("%v,%v", file, line) - } - } - }() fmt.Println("start autobuild") path, _ := os.Getwd() os.Chdir(path)