From c53a1998c589a544b25d53f6e6fdf0f24a4df25b Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Thu, 2 Feb 2023 21:25:25 +0800 Subject: all: replace `interface{}` with `any` (#7330) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- internal/db/repo_branch.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/db/repo_branch.go') diff --git a/internal/db/repo_branch.go b/internal/db/repo_branch.go index dc9e8795..65bcdc4a 100644 --- a/internal/db/repo_branch.go +++ b/internal/db/repo_branch.go @@ -48,7 +48,7 @@ func GetBranchesByPath(path string) ([]*Branch, error) { var _ errutil.NotFound = (*ErrBranchNotExist)(nil) type ErrBranchNotExist struct { - args map[string]interface{} + args map[string]any } func IsErrBranchNotExist(err error) bool { @@ -66,7 +66,7 @@ func (ErrBranchNotExist) NotFound() bool { func (repo *Repository) GetBranch(name string) (*Branch, error) { if !git.RepoHasBranch(repo.RepoPath(), name) { - return nil, ErrBranchNotExist{args: map[string]interface{}{"name": name}} + return nil, ErrBranchNotExist{args: map[string]any{"name": name}} } return &Branch{ RepoPath: repo.RepoPath(), @@ -122,7 +122,7 @@ func GetProtectBranchOfRepoByName(repoID int64, name string) (*ProtectBranch, er if err != nil { return nil, err } else if !has { - return nil, ErrBranchNotExist{args: map[string]interface{}{"name": name}} + return nil, ErrBranchNotExist{args: map[string]any{"name": name}} } return protectBranch, nil } -- cgit v1.2.3