This commit is contained in:
richboo111
2023-05-11 18:21:09 +08:00
parent 6d314dbacc
commit 918485a7c4
6 changed files with 78 additions and 83 deletions

View File

@@ -153,7 +153,7 @@ var (
CommonSetting = &commonConf{}
GlobalSetting = &global{}
//心跳相关
heartbeatInterval = 60 * time.Second // 心跳间隔
heartbeatInterval = 20 * time.Second // 心跳间隔
HeartCheckMsg = "~#HHHBBB#~" //心跳检测消息
HeartCheckSuccess = "HB" //成功发送返回心跳消息
HeartSuccessWord = "成功" //成功发送返回心跳消息
@@ -345,3 +345,10 @@ func RandString() string {
}
return string(bytes)
}
// JsonCommon json格式化
func JsonCommon(str string) (retVal string) {
temp, _ := json.Marshal(str)
_ = json.Unmarshal(temp, &retVal)
return retVal
}