aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo_transfer.go
diff options
context:
space:
mode:
authorCheng <36215014+ChengenH@users.noreply.github.com>2024-04-22 03:44:03 +0800
committerGitHub <noreply@github.com>2024-04-21 19:44:03 +0000
commit9de443ced2c328d9b58a5e144a765f402aab859d (patch)
tree313cebffc92930047dce631db8c6597f0bcd0644 /models/repo_transfer.go
parentf95622cddc8db24719d10794e50ae6b125e6b96e (diff)
downloadgitea-9de443ced2c328d9b58a5e144a765f402aab859d.tar.gz
gitea-9de443ced2c328d9b58a5e144a765f402aab859d.zip
chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621)
use errors.New to replace fmt.Errorf with no parameters will much better
Diffstat (limited to 'models/repo_transfer.go')
-rw-r--r--models/repo_transfer.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/repo_transfer.go b/models/repo_transfer.go
index 747ec2f248..37f591f65d 100644
--- a/models/repo_transfer.go
+++ b/models/repo_transfer.go
@@ -5,6 +5,7 @@ package models
import (
"context"
+ "errors"
"fmt"
"code.gitea.io/gitea/models/db"
@@ -147,7 +148,7 @@ func DeleteRepositoryTransfer(ctx context.Context, repoID int64) error {
func TestRepositoryReadyForTransfer(status repo_model.RepositoryStatus) error {
switch status {
case repo_model.RepositoryBeingMigrated:
- return fmt.Errorf("repo is not ready, currently migrating")
+ return errors.New("repo is not ready, currently migrating")
case repo_model.RepositoryPendingTransfer:
return ErrRepoTransferInProgress{}
}