示例#1
0
文件: config.go 项目: moyee/mycron
func init() {
	c := conf.NewConfig(ConfigPath)
	//mysql
	Mysql_host = c.Read("mysql", "host")
	Mysql_prot = c.GetInt("mysql", "port")
	Mysql_user = c.Read("mysql", "user")
	Mysql_pwd = c.Read("mysql", "pwd")
	Mysql_dbname = c.Read("mysql", "dbname")

	//logger
	Log_Path = c.Read("log", "logPath")
	Log_filename = c.Read("log", "filename")
}
示例#2
0
func init() {
	configPath := "etc/ir.conf"
	c := conf.NewConfig(configPath)
	sorce_base_path = c.Read("base", "sorce_base_path")
	thumb_base_path = c.Read("base", "thumb_base_path")
	ip = c.Read("base", "ip")
	port = c.GetInt("base", "port")
	for_cdn = c.GetInt("base", "for_cdn")
	compress = c.Read("base", "compress")
	suport_size = c.Read("base", "suport_size")
	if suport_size != "" {
		size_arr := strings.Split(suport_size, ",")
		for _, v := range size_arr {
			size_map[v] = true
		}
	}
}