mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-14 13:29:31 +00:00
runtime: Fix non constant Errorf formatting
As part of the go 1.24.6 bump there are errors about the incorrect use of a errorf, so switch to the non-formatting version, or add the format string as appropriate Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
381da9e603
commit
8cbb1a4357
@@ -31,9 +31,9 @@ func toGRPC(err error) error {
|
||||
err = errors.Cause(err)
|
||||
switch {
|
||||
case isInvalidArgument(err):
|
||||
return status.Errorf(codes.InvalidArgument, err.Error())
|
||||
return status.Error(codes.InvalidArgument, err.Error())
|
||||
case isNotFound(err):
|
||||
return status.Errorf(codes.NotFound, err.Error())
|
||||
return status.Error(codes.NotFound, err.Error())
|
||||
}
|
||||
|
||||
return err
|
||||
|
@@ -178,7 +178,7 @@ func notImplemented(name string) error {
|
||||
|
||||
err := errors.Errorf("%s: not implemented", name)
|
||||
|
||||
hvLogger.Errorf(err.Error())
|
||||
hvLogger.Error(err.Error())
|
||||
|
||||
if tracer, ok := err.(interface{ StackTrace() errors.StackTrace }); ok {
|
||||
for _, f := range tracer.StackTrace() {
|
||||
|
Reference in New Issue
Block a user