iedc-go/var.go
2017-10-27 04:28:47 +00:00

33 lines
912 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package hotime
import "sync"
//var Config = struct {
// LogLevel int
//}{
// LogLevel: LOG_FMT, //日志等级处理LogFmt显示所有错误到控制台LogNil不记录任何错误
//}
var mutex = map[interface{}]*sync.RWMutex{} //安全锁
var mutexer = sync.RWMutex{} //读写锁
var IsRun = false //当前状态
var App = map[string]*Application{} //整个项目
//var Db = HoTimeDB{} //数据库实例
var Config = Map{
"tpt": "tpt",
"logLevel": LOG_NIL,
"defFile": []string{"index.html", "index.htm"},
"dbHost": "127.0.0.1",
//"dbHost":"localhost",
"dbName": "test",
"dbUser": "root",
"dbPwd": "root",
"dbPort": "3306",
"port": "80",
"cacheShortTime": 60 * 60 * 2,
"cacheLongTime": 60 * 60 * 24 * 30,
"sessionName": "HOTIME",
"error": Map{},
}