示例#1
0
文件: main.go 项目: grunya404/dns
func main() {
	w, err := watcher.New()
	if err != nil {
		log.Error("Unable to start Watcher: %s", err)
		return
	}
	w.Start()
	log.Info("Watcher started.")
	q := make(chan bool)
	<-q
}
示例#2
0
文件: main.go 项目: grunya404/dns
func main() {
	go func() {
		w, err := watcher.New()
		if err != nil {
			log.Error("Unable to start watcher: %s", err)
			return
		}
		w.Start()
	}()
	startREST()
}