示例#1
0
文件: cache.go 项目: deepzz0/goblog
func doReadBackLeftBarConfig() {
	b, err := ioutil.ReadFile(path + "/conf/backleft.conf")
	if err != nil {
		log.Fatal(err)
	}
	err = json.Unmarshal(b, &Cache.BackgroundLeftBars)
	if err != nil {
		log.Fatal(err)
	}
	for _, v := range Cache.BackgroundLeftBars {
		if v.ID != "" {
			Cache.BackgroundLeftBar[v.ID] = v.ID
		}
	}
}
示例#2
0
文件: model.go 项目: deepzz0/goblog
func init() {
	if err := ip17mon.Init(path + "/conf/17monipdb.dat"); err != nil {
		log.Fatal(err)
	}
	//
	UMgr.loadUsers()
	Blogger = UMgr.Get("deepzz")
	// not found account
	if Blogger == nil {
		initAccount()
	}
	TMgr.loadTopics()
	// open error mail,email addr : Blogger.Email
	log.SetEmail(Blogger.Email)
	ManageData.LoadData()
	monitor.HookOnExit("flushdata", flushdata)
	monitor.Startup()

	go RequestM.Saver()
	go timer()
}