From c94c05373f4bc79361ab2fcdd3516c244bc67312 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Wed, 25 Oct 2023 23:11:42 +0200 Subject: Fix lints reported by gopls --- internal/rtree/index.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'internal/rtree/index.go') diff --git a/internal/rtree/index.go b/internal/rtree/index.go index efc3c1f..6b7bba8 100644 --- a/internal/rtree/index.go +++ b/internal/rtree/index.go @@ -265,8 +265,8 @@ func (i *Index) FindRepo(rawRemoteURL string, allowClone bool) (*Repo, error) { return nil, err } i.Repos = append(i.Repos, &newRepo) - i.Write() - return &newRepo, nil + err = i.Write() + return &newRepo, err } //if we found fork candidates, ask the user to match the repo with a fork @@ -294,8 +294,8 @@ func (i *Index) FindRepo(rawRemoteURL string, allowClone bool) (*Repo, error) { return nil, err } i.Repos = append(i.Repos, &newRepo) - i.Write() - return &newRepo, nil + err = i.Write() + return &newRepo, err } //find the repo selected by the user @@ -338,8 +338,8 @@ func (i *Index) FindRepo(rawRemoteURL string, allowClone bool) (*Repo, error) { Name: remoteName, URL: remoteURL, }) - i.Write() - return target, nil + err = i.Write() + return target, err } // ImportRepo moves the given repo into the rtree and adds it to the index. -- cgit v1.3.1