Finish the mirror feature. Finish the prototype of zip compress.

This commit is contained in:
zicla
2019-04-28 22:18:42 +08:00
parent a4f28cca30
commit 6e0078e1d8
25 changed files with 800 additions and 128 deletions

15
main.go
View File

@ -11,24 +11,31 @@ import (
func main() {
//第一步。日志
//第一步。命令行工具处理
tankCommand := &support.TankCommand{}
core.COMMAND = tankCommand
if core.COMMAND.Cli() {
return
}
//第二步。日志
tankLogger := &support.TankLogger{}
core.LOGGER = tankLogger
tankLogger.Init()
defer tankLogger.Destroy()
//第步。配置
//第步。配置
tankConfig := &support.TankConfig{}
core.CONFIG = tankConfig
tankConfig.Init()
//第步。全局运行的上下文
//第步。全局运行的上下文
tankContext := &support.TankContext{}
core.CONTEXT = tankContext
tankContext.Init()
defer tankContext.Destroy()
//第步。启动http服务
//第步。启动http服务
http.Handle("/", core.CONTEXT)
core.LOGGER.Info("App started at http://localhost:%v", core.CONFIG.ServerPort())