chore: replace pkg/errors with cockroachdb/errors (#8098)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: unknwon <2946214+unknwon@users.noreply.github.com>
This commit is contained in:
Copilot
2026-01-22 08:20:53 -05:00
committed by GitHub
parent ae59787ff5
commit 4ee706b2bf
96 changed files with 605 additions and 564 deletions

View File

@@ -6,7 +6,7 @@ import (
"reflect"
"runtime"
"github.com/pkg/errors"
"github.com/cockroachdb/errors"
"github.com/urfave/cli"
"gogs.io/gogs/internal/conf"
@@ -180,7 +180,7 @@ func adminDashboardOperation(operation func() error, successMessage string) func
if err := operation(); err != nil {
functionName := runtime.FuncForPC(reflect.ValueOf(operation).Pointer()).Name()
return fmt.Errorf("%s: %v", functionName, err)
return errors.Newf("%s: %v", functionName, err)
}
fmt.Printf("%s\n", successMessage)