-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
45 lines (43 loc) · 967 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package main
import (
"BasicOA/config"
"BasicOA/serve/email"
"BasicOA/serve/form"
"BasicOA/serve/gin"
"BasicOA/serve/log"
"BasicOA/serve/mysql"
"BasicOA/serve/task"
_type "BasicOA/type"
"runtime"
"sync"
)
func main() {
// 开启全核心
runtime.GOMAXPROCS(runtime.NumCPU())
// 日志系统调试模式
log.SetMode(false)
// Logo
var i = " ____ _ ___ __ __ \n| __ ) __ _ ___(_) ___ |_ _| | \\/ |\n| _ \\ / _` / __| |/ __| | | | |\\/| |\n| |_) | (_| \\__ \\ | (__ | | | | | |\n|____/ \\__,_|___/_|\\___| |___| |_| |_|\n"
log.Print(i)
log.Debug("版本:", "1.0.0 图库版")
wg := sync.WaitGroup{}
wg.Add(1)
// 配置文件
config.Run()
wg.Add(1)
// 启动Email服务
email.RunEmail()
wg.Add(1)
// 启动集成Mysql服务
go mysql.RunMysql()
// 启动文件服务
wg.Add(1)
go _type.Run()
// 启动表单服务
wg.Add(1)
go form.Run()
// 启动Gin集成服务
task.Run()
gin.RunGin()
wg.Wait()
}