修复全部SA1006: fmt.Errorf(i18n)统一使用"%s"前缀

This commit is contained in:
ZacharyZcR
2026-05-18 05:17:40 +08:00
parent f427f04d35
commit 639298b7c8
32 changed files with 61 additions and 61 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ func (p *RabbitMQPlugin) Scan(ctx context.Context, info *common.HostInfo, sessio
return &ScanResult{
Success: false,
Service: "rabbitmq",
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
}
}
@@ -307,7 +307,7 @@ func (p *RabbitMQPlugin) testManagementInterface(ctx context.Context, info *comm
return &ScanResult{
Success: false,
Service: "rabbitmq",
Error: fmt.Errorf(i18n.Tr("service_not_identified", "RabbitMQ")),
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "RabbitMQ")),
}
}