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

remove useless codes again

This commit is contained in:
ssx 2013-07-06 16:23:35 +08:00
parent 9e602fd75f
commit df0fb8595b

View File

@ -6,13 +6,11 @@ import (
"log" "log"
"os" "os"
"os/exec" "os/exec"
"runtime"
"sync" "sync"
"time" "time"
) )
var ( var (
restart chan bool
cmd *exec.Cmd cmd *exec.Cmd
state sync.Mutex state sync.Mutex
eventTime = make(map[string]time.Time) eventTime = make(map[string]time.Time)
@ -60,19 +58,7 @@ func NewWatcher(paths []string) {
func Autobuild() { func Autobuild() {
state.Lock() state.Lock()
defer state.Unlock() 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") fmt.Println("start autobuild")
path, _ := os.Getwd() path, _ := os.Getwd()
os.Chdir(path) os.Chdir(path)