From 112cfd55a98598ebe9677e0cf5ec929ea18fc523 Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 24 Mar 2024 06:09:58 +0800 Subject: [PATCH] =?utf8?q?Improve=20=E4=BC=98=E5=8C=96state?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- CV/Var.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CV/Var.go b/CV/Var.go index b3e1e6b..4196dfe 100644 --- a/CV/Var.go +++ b/CV/Var.go @@ -73,15 +73,15 @@ type Common struct { AcceptQn map[int]string `json:"-"` //允许的直播流质量 Qn map[int]string `json:"-"` //全部直播流质量 // StreamType StreamType `json:"streamType"` //当前直播流类型 - AllStreamType map[string]StreamType `json:"-"` //直播流类型 - K_v syncmap.Map `json:"-"` //配置文件 - Log *log.Log_interface `json:"-"` //日志 - Danmu_Main_mq *mq.Msgq `json:"-"` //消息 - ReqPool *pool.Buf[reqf.Req] `json:"-"` //请求池 - SerF *web.WebPath `json:"-"` //web服务处理 - SerLimit *web.Limits `json:"-"` //Web服务连接限制 - StartT time.Time `json:"startT"` //启动时间 - Cache syncmap.Map `json:"-"` //缓存 + AllStreamType map[string]StreamType `json:"-"` //直播流类型 + K_v syncmap.Map `json:"-"` //配置文件 + Log *log.Log_interface `json:"-"` //日志 + Danmu_Main_mq *mq.Msgq `json:"-"` //消息 + ReqPool *pool.Buf[reqf.Req] `json:"-"` //请求池 + SerF *web.WebPath `json:"-"` //web服务处理 + SerLimit *web.Limits `json:"-"` //Web服务连接限制 + StartT time.Time `json:"-"` //启动时间 + Cache syncmap.Map `json:"-"` //缓存 } type LiveQn struct { @@ -572,7 +572,7 @@ type ResStruct struct { func (t ResStruct) Write(w http.ResponseWriter) []byte { w.Header().Set("Content-Type", "application/json") - data, e := json.Marshal(t) + data, e := json.MarshalIndent(t, "", " ") if e != nil { t.Code = -1 t.Data = nil -- 2.39.2