mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 13:11:53 +08:00
修复全部SA1006: fmt.Errorf(i18n)统一使用"%s"前缀
This commit is contained in:
@@ -51,7 +51,7 @@ func (p *ElasticsearchPlugin) Scan(ctx context.Context, info *common.HostInfo, s
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "elasticsearch",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (p *ElasticsearchPlugin) Scan(ctx context.Context, info *common.HostInfo, s
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "elasticsearch",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_weak_pass")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_weak_pass")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ func (p *ElasticsearchPlugin) identifyService(ctx context.Context, info *common.
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "elasticsearch",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "Elasticsearch")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "Elasticsearch")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user