forked from Mrs4s/go-cqhttp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.go
32 lines (27 loc) · 958 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
// Package main 程序的主体部分
package main
import (
_ "github.com/GoAdminGroup/go-admin/adapter/iris" // web framework adapter
_ "github.com/GoAdminGroup/go-admin/modules/db/drivers/sqlite" // sql driver
_ "github.com/GoAdminGroup/themes/adminlte" // ui theme
"github.com/Mrs4s/go-cqhttp/internal/base"
"github.com/Mrs4s/go-cqhttp/cmd/gocq"
iris_admin "github.com/Mrs4s/go-cqhttp/cmd/iris_admin"
_ "github.com/Mrs4s/go-cqhttp/db/leveldb" // leveldb
_ "github.com/Mrs4s/go-cqhttp/modules/silk" // silk编码模块
// 其他模块
// _ "github.com/Mrs4s/go-cqhttp/db/sqlite3" // sqlite3 数据库支持
// _ "github.com/Mrs4s/go-cqhttp/db/mongodb" // mongodb 数据库支持
// _ "github.com/Mrs4s/go-cqhttp/modules/pprof" // pprof 性能分析
)
func main() {
if checkWebui() {
iris_admin.StartServer()
} else {
gocq.Main()
}
}
func checkWebui() bool {
base.Parse()
return base.WebUI
}