forked from TrueCloudLab/frostfs-node
[#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:
parent
66a26b7775
commit
d433b49265
39 changed files with 143 additions and 72 deletions
|
@ -1004,12 +1004,12 @@ func (c *cfg) loggerPrm() (*logger.Prm, error) {
|
|||
err := c.dynamicConfiguration.logger.SetLevelString(c.LoggerCfg.level)
|
||||
if err != nil {
|
||||
// not expected since validation should be performed before
|
||||
panic(fmt.Sprintf("incorrect log level format: %s", c.LoggerCfg.level))
|
||||
panic("incorrect log level format: " + c.LoggerCfg.level)
|
||||
}
|
||||
err = c.dynamicConfiguration.logger.SetDestination(c.LoggerCfg.destination)
|
||||
if err != nil {
|
||||
// not expected since validation should be performed before
|
||||
panic(fmt.Sprintf("incorrect log destination format: %s", c.LoggerCfg.destination))
|
||||
panic("incorrect log destination format: " + c.LoggerCfg.destination)
|
||||
}
|
||||
|
||||
return c.dynamicConfiguration.logger, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue