修复lint: errcheck返回值检查, SA1006动态格式化字符串

- scanner_core: 3处InitializeGlobalVScan()返回值用_显式丢弃
- flag/initialize/network: fmt.Errorf(i18n.Tr(...))改为fmt.Errorf("%s", i18n.Tr(...))
This commit is contained in:
ZacharyZcR
2026-05-18 05:07:02 +08:00
parent a560531e70
commit 05e383d8bf
+3 -3
View File
@@ -127,19 +127,19 @@ func InitializeGlobalVScan() error {
// GetGlobalVScan 获取全局VScan实例 // GetGlobalVScan 获取全局VScan实例
func GetGlobalVScan() *VScan { func GetGlobalVScan() *VScan {
InitializeGlobalVScan() // 确保已初始化 _ = InitializeGlobalVScan() // 确保已初始化
return &globalVScan return &globalVScan
} }
// GetNullProbe 获取NULL探测器 // GetNullProbe 获取NULL探测器
func GetNullProbe() *Probe { func GetNullProbe() *Probe {
InitializeGlobalVScan() // 确保已初始化 _ = InitializeGlobalVScan() // 确保已初始化
return globalNull return globalNull
} }
// GetCommonProbe 获取通用探测器 // GetCommonProbe 获取通用探测器
func GetCommonProbe() *Probe { func GetCommonProbe() *Probe {
InitializeGlobalVScan() // 确保已初始化 _ = InitializeGlobalVScan() // 确保已初始化
return globalCommon return globalCommon
} }