use format string when using printf like commands

As per https://github.com/golang/go/issues/60529, printf like commands with
non-constant format strings and no args give an error in govet

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
Akhil Mohan
2024-08-14 16:01:12 +05:30
parent 1027b314a6
commit ebc47359ea
4 changed files with 9 additions and 8 deletions

View File

@@ -76,7 +76,7 @@ func (c *criService) CheckpointContainer(ctx context.Context, r *runtime.Checkpo
podCriuVersion,
r.GetContainerId(),
)
log.G(ctx).WithError(err).Errorf(errorMessage)
log.G(ctx).WithError(err).Error(errorMessage)
return nil, fmt.Errorf(
"%s: %w",
errorMessage,