diff --git a/conf/conf.go b/conf/conf.go index 8bb1a1c..56a172d 100644 --- a/conf/conf.go +++ b/conf/conf.go @@ -6,7 +6,7 @@ import ( "strconv" "github.com/BurntSushi/toml" - "github.com/fsnotify/fsnotify" + "github.com/wweir/fsnotify" "github.com/golang/glog" ) @@ -53,6 +53,7 @@ var OnRefreash = []func() error{func() error { return nil }} +// watchConfigFile changes, fsnotify take too much cpu time, DIY func watchConfigFile() { watcher, err := fsnotify.NewWatcher() if err != nil { diff --git a/go.mod b/go.mod index 10d5106..c65ad68 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ require ( github.com/BurntSushi/toml v0.3.1 github.com/bifurcation/mint v0.0.0-20181105071958-a14404e9a861 // indirect github.com/cheekybits/genny v1.0.0 // indirect - github.com/fsnotify/fsnotify v1.4.7 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/mock v1.1.1 // indirect github.com/hashicorp/golang-lru v0.5.0 // indirect @@ -14,6 +13,7 @@ require ( github.com/miekg/dns v1.0.15 github.com/onsi/ginkgo v1.7.0 // indirect github.com/onsi/gomega v1.4.3 // indirect + github.com/wweir/fsnotify v1.4.7 golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869 // indirect golang.org/x/net v0.0.0-20181114220301-adae6a3d119a // indirect golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect diff --git a/go.sum b/go.sum index 3a7133f..f66611e 100644 --- a/go.sum +++ b/go.sum @@ -29,6 +29,8 @@ github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/wweir/fsnotify v1.4.7 h1:uOWkm3Su8Cb5JCeeClayR2UhI2Nz70GhHOt8c8rTCr0= +github.com/wweir/fsnotify v1.4.7/go.mod h1:4GuxIc23DXfJI1/LhBXG5eE/wJ4CzL+kk5M7woxVprc= golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869 h1:kkXA53yGe04D0adEYJwEVQjeBppL01Exg+fnMjfUraU= golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=