1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 19:43:49 +08:00

remove webui config.

This commit is contained in:
Mrs4s 2021-03-26 16:34:22 +08:00
parent 931a720692
commit 65ed6e89a7
2 changed files with 8 additions and 10 deletions

View File

@ -173,7 +173,7 @@ type JSONConfig struct {
UseSSOAddress bool `json:"use_sso_address"` UseSSOAddress bool `json:"use_sso_address"`
Debug bool `json:"debug"` Debug bool `json:"debug"`
LogLevel string `json:"log_level"` LogLevel string `json:"log_level"`
WebUI *GoCQWebUI `json:"web_ui"` //WebUI *GoCQWebUI `json:"web_ui"`
} }
// CQHTTPAPIConfig HTTPAPI对应的Config结构体 // CQHTTPAPIConfig HTTPAPI对应的Config结构体
@ -221,6 +221,7 @@ type GoCQReverseWebSocketConfig struct {
ReverseReconnectInterval uint16 `json:"reverse_reconnect_interval"` ReverseReconnectInterval uint16 `json:"reverse_reconnect_interval"`
} }
/*
// GoCQWebUI WebUI对应Config结构体 // GoCQWebUI WebUI对应Config结构体
type GoCQWebUI struct { type GoCQWebUI struct {
Enabled bool `json:"enabled"` Enabled bool `json:"enabled"`
@ -228,6 +229,7 @@ type GoCQWebUI struct {
WebUIPort uint64 `json:"web_ui_port"` WebUIPort uint64 `json:"web_ui_port"`
WebInput bool `json:"web_input"` WebInput bool `json:"web_input"`
} }
*/
// DefaultConfig 返回一份默认配置对应结构体 // DefaultConfig 返回一份默认配置对应结构体
func DefaultConfig() *JSONConfig { func DefaultConfig() *JSONConfig {
@ -273,12 +275,6 @@ func DefaultConfig() *JSONConfig {
ReverseReconnectInterval: 3000, ReverseReconnectInterval: 3000,
}, },
}, },
WebUI: &GoCQWebUI{
Enabled: true,
Host: "127.0.0.1",
WebInput: false,
WebUIPort: 9999,
},
} }
} }

View File

@ -180,9 +180,11 @@ func main() {
log.Warnf("已开启Debug模式.") log.Warnf("已开启Debug模式.")
log.Debugf("开发交流群: 192548878") log.Debugf("开发交流群: 192548878")
server.Debug = true server.Debug = true
if conf.WebUI == nil || !conf.WebUI.Enabled { /*
log.Warnf("警告: 在Debug模式下未启用WebUi服务, 将无法进行性能分析.") if conf.WebUI == nil || !conf.WebUI.Enabled {
} log.Warnf("警告: 在Debug模式下未启用WebUi服务, 将无法进行性能分析.")
}
*/
} }
log.Info("用户交流群: 721829413") log.Info("用户交流群: 721829413")
if !global.PathExists("device.json") { if !global.PathExists("device.json") {