diff options
author | Joe Chen <jc@unknwon.io> | 2023-02-02 21:25:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 21:25:25 +0800 |
commit | c53a1998c589a544b25d53f6e6fdf0f24a4df25b (patch) | |
tree | 1c3c9d693ba551eecfbc535be942e40b5acf9cf7 /internal/db/repo_branch.go | |
parent | 614382fec0ba05149785539ab93560d4d42c194d (diff) |
all: replace `interface{}` with `any` (#7330)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/db/repo_branch.go')
-rw-r--r-- | internal/db/repo_branch.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 } |