refactor: replace deprecated github.com/pkg/errors with errors pkg (#5577)
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user