[#973] node: Resolve perfsprint linter

`fmt.Errorf can be replaced with errors.New` and `fmt.Sprintf can be replaced with string addition`

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-03-11 17:55:50 +03:00
parent 66a26b7775
commit d433b49265
39 changed files with 143 additions and 72 deletions

View file

@ -75,7 +75,7 @@ func main() {
func initAndLog(c *cfg, name string, initializer func(*cfg)) {
c.log.Info(fmt.Sprintf("initializing %s service...", name))
initializer(c)
c.log.Info(fmt.Sprintf("%s service has been successfully initialized", name))
c.log.Info(name + " service has been successfully initialized")
}
func initApp(ctx context.Context, c *cfg) {
@ -124,7 +124,7 @@ func runAndLog(ctx context.Context, c *cfg, name string, logSuccess bool, starte
starter(ctx, c)
if logSuccess {
c.log.Info(fmt.Sprintf("%s service started successfully", name))
c.log.Info(name + " service started successfully")
}
}
@ -138,7 +138,7 @@ func stopAndLog(c *cfg, name string, stopper func() error) {
)
}
c.log.Debug(fmt.Sprintf("%s service has been stopped", name))
c.log.Debug(name + " service has been stopped")
}
func bootUp(ctx context.Context, c *cfg) {