refactor: replace deprecated github.com/pkg/errors with errors pkg (#5577)

This commit is contained in:
Oleksandr Redko
2024-02-02 16:56:28 +02:00
committed by GitHub
parent 2dafe7709a
commit 426aad68dc
14 changed files with 34 additions and 55 deletions

View File

@@ -16,11 +16,10 @@ package task
import (
"context"
"errors"
"fmt"
"html/template"
"github.com/pkg/errors"
"github.com/beego/beego/v2/core/admin"
)
@@ -78,7 +77,7 @@ func (r *runTaskCommand) Execute(params ...interface{}) *admin.Result {
} else {
return &admin.Result{
Status: 400,
Error: errors.New(fmt.Sprintf("task with name %s not found", tn)),
Error: fmt.Errorf("task with name %s not found", tn),
}
}
}