forked from golang/hotime
框架基本完成
This commit is contained in:
parent
f97dd2752b
commit
b15004b86b
16
.idea/libraries/GOPATH__hotime_.xml
generated
16
.idea/libraries/GOPATH__hotime_.xml
generated
@ -1,30 +1,14 @@
|
||||
<component name="libraryTable">
|
||||
<library name="GOPATH <hotime>">
|
||||
<CLASSES>
|
||||
<root url="file://E:/gopath/src/hblog" />
|
||||
<root url="file://$PROJECT_DIR$/../../golang.org" />
|
||||
<root url="file://E:/gopath/src/test" />
|
||||
<root url="file://$PROJECT_DIR$/../../github.com" />
|
||||
<root url="file://E:/gopath/src/github.com" />
|
||||
<root url="file://$PROJECT_DIR$/.." />
|
||||
<root url="file://E:/gopath/src/timpen" />
|
||||
<root url="file://E:/gopath/src/golang.org" />
|
||||
<root url="file://E:/gopath/src/bitbucket.org" />
|
||||
<root url="file://E:/gopath/src/gopkg.in" />
|
||||
<root url="file://E:/gopath/src/hotime" />
|
||||
</CLASSES>
|
||||
<SOURCES>
|
||||
<root url="file://E:/gopath/src/hblog" />
|
||||
<root url="file://$PROJECT_DIR$/../../golang.org" />
|
||||
<root url="file://E:/gopath/src/test" />
|
||||
<root url="file://$PROJECT_DIR$/../../github.com" />
|
||||
<root url="file://E:/gopath/src/github.com" />
|
||||
<root url="file://$PROJECT_DIR$/.." />
|
||||
<root url="file://E:/gopath/src/timpen" />
|
||||
<root url="file://E:/gopath/src/golang.org" />
|
||||
<root url="file://E:/gopath/src/bitbucket.org" />
|
||||
<root url="file://E:/gopath/src/gopkg.in" />
|
||||
<root url="file://E:/gopath/src/hotime" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
<root url="file://$PROJECT_DIR$" />
|
||||
|
@ -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
|
||||
|
2
func.go
2
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) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user