From b15004b86b64ac3af76fffc9a3f72131aa7cdae9 Mon Sep 17 00:00:00 2001 From: hoteas Date: Thu, 17 Aug 2017 02:14:22 +0000 Subject: [PATCH] =?UTF-8?q?=E6=A1=86=E6=9E=B6=E5=9F=BA=E6=9C=AC=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/libraries/GOPATH__hotime_.xml | 16 ---------------- context.go | 4 ++-- func.go | 2 +- var.go | 2 +- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.idea/libraries/GOPATH__hotime_.xml b/.idea/libraries/GOPATH__hotime_.xml index 790b4ff..55a4127 100644 --- a/.idea/libraries/GOPATH__hotime_.xml +++ b/.idea/libraries/GOPATH__hotime_.xml @@ -1,30 +1,14 @@ - - - - - - - - - - - - - - - - diff --git a/context.go b/context.go index cabc085..3c5892e 100644 --- a/context.go +++ b/context.go @@ -12,7 +12,7 @@ type Context struct { tag int64 Resp http.ResponseWriter Req *http.Request - App *App + Application *Application RouterString []string Config Map Db *HoTimeDB @@ -32,7 +32,7 @@ func (this *Context) GetTag() int64 { //唯一标志 func (this *Context) Mtd(router [3]string) Map { - this.App.Router[router[0]][router[1]][router[2]](this) + this.Application.Router[router[0]][router[1]][router[2]](this) d := this.resp this.resp = nil return d diff --git a/func.go b/func.go index 555f3df..23b8b70 100644 --- a/func.go +++ b/func.go @@ -300,7 +300,7 @@ func Round(f float64, n int) float64 { // CacheMemIns.Init(Config["cacheConfig"].(Map)["memory"].(CacheConfg).Time) // CacheDBIns.Init(Config["cacheConfig"].(Map)["db"].(CacheConfg).Time) //} -func run(a *App) { +func run(a *Application) { if !IsRun { http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { diff --git a/var.go b/var.go index 278daae..20d4677 100644 --- a/var.go +++ b/var.go @@ -10,7 +10,7 @@ import "sync" var mutex = map[interface{}]*sync.RWMutex{} //安全锁 var mutexer = sync.RWMutex{} //读写锁 var IsRun = false //当前状态 -var application = map[string]*App{} //整个项目 +var application = map[string]*Application{} //整个项目 //var Db = HoTimeDB{} //数据库实例