Update scan.go

This commit is contained in:
公明 2025-02-26 12:35:38 +08:00 committed by GitHub
parent d3429515d1
commit 667cf83141
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

11
scan.go
View File

@ -74,6 +74,17 @@ func scan() {
log.Fatalf("Error marshaling to JSON: %v", err)
}
log.Println(string(jsonData))
//--- 前端
var dataItem DataItem
// 解析 JSON 数据到结构体
err = json.Unmarshal([]byte(jsonData), &dataItem)
if err != nil {
log.Fatalf("Error parsing JSON: %v", err)
}
// 打印解析后的结构体内容
fmt.Printf("Parsed DataItem: %+v\n", dataItem)
Resp = append(Resp, dataItem)
//---
fmt.Println(PrintYuequan(resultOutput.Result, resultOutput.Method, resultOutput.Host+resultOutput.Path, resultOutput.Reason))
logs.Delete(key)
return true // 返回true继续遍历返回false停止遍历