优化代码

This commit is contained in:
GoEdgeLab
2023-08-08 14:17:16 +08:00
parent 9f24a6b3ee
commit 1f39947a89
58 changed files with 159 additions and 125 deletions

View File

@@ -297,7 +297,7 @@ func (this *DetailAction) RunGet(params struct {
}
// 缓存硬盘 & 内存容量
var maxCacheDiskCapacity maps.Map = nil
var maxCacheDiskCapacity maps.Map
if node.MaxCacheDiskCapacity != nil {
maxCacheDiskCapacity = maps.Map{
"count": node.MaxCacheDiskCapacity.Count,
@@ -310,7 +310,7 @@ func (this *DetailAction) RunGet(params struct {
}
}
var maxCacheMemoryCapacity maps.Map = nil
var maxCacheMemoryCapacity maps.Map
if node.MaxCacheMemoryCapacity != nil {
maxCacheMemoryCapacity = maps.Map{
"count": node.MaxCacheMemoryCapacity.Count,

View File

@@ -33,7 +33,7 @@ func (this *IndexAction) RunGet(params struct {
}
// 缓存硬盘 & 内存容量
var maxCacheDiskCapacity maps.Map = nil
var maxCacheDiskCapacity maps.Map
if node.MaxCacheDiskCapacity != nil {
maxCacheDiskCapacity = maps.Map{
"count": node.MaxCacheDiskCapacity.Count,
@@ -46,7 +46,7 @@ func (this *IndexAction) RunGet(params struct {
}
}
var maxCacheMemoryCapacity maps.Map = nil
var maxCacheMemoryCapacity maps.Map
if node.MaxCacheMemoryCapacity != nil {
maxCacheMemoryCapacity = maps.Map{
"count": node.MaxCacheMemoryCapacity.Count,

View File

@@ -43,7 +43,7 @@ func (this *IndexAction) RunGet(params struct {
}
this.Data["config"] = config
var httpAllDomainMismatchActionContentHTML = ""
var httpAllDomainMismatchActionContentHTML string
var httpAllDomainMismatchActionStatusCode = "404"
if config.HTTPAll.DomainMismatchAction != nil && config.HTTPAll.DomainMismatchAction.Options != nil {
httpAllDomainMismatchActionContentHTML = config.HTTPAll.DomainMismatchAction.Options.GetString("contentHTML")