优化代码

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

@@ -31,7 +31,7 @@ func (this *ExportDownloadAction) RunGet(params struct {
if ok {
this.AddHeader("Content-Disposition", "attachment; filename=\"WAF-"+types.String(params.PolicyId)+".json\";")
this.AddHeader("Content-Length", strconv.Itoa(len(data)))
this.Write(data)
_, _ = this.Write(data)
} else {
this.WriteString("找不到要导出的内容")
return