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/route/api/v1/repo | |
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/route/api/v1/repo')
-rw-r--r-- | internal/route/api/v1/repo/repo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/route/api/v1/repo/repo.go b/internal/route/api/v1/repo/repo.go index c0e3b612..089269ac 100644 --- a/internal/route/api/v1/repo/repo.go +++ b/internal/route/api/v1/repo/repo.go @@ -34,7 +34,7 @@ func Search(c *context.APIContext) { } else { u, err := db.Users.GetByID(c.Req.Context(), opts.OwnerID) if err != nil { - c.JSON(http.StatusInternalServerError, map[string]interface{}{ + c.JSON(http.StatusInternalServerError, map[string]any{ "ok": false, "error": err.Error(), }) @@ -49,7 +49,7 @@ func Search(c *context.APIContext) { repos, count, err := db.SearchRepositoryByName(opts) if err != nil { - c.JSON(http.StatusInternalServerError, map[string]interface{}{ + c.JSON(http.StatusInternalServerError, map[string]any{ "ok": false, "error": err.Error(), }) @@ -57,7 +57,7 @@ func Search(c *context.APIContext) { } if err = db.RepositoryList(repos).LoadAttributes(); err != nil { - c.JSON(http.StatusInternalServerError, map[string]interface{}{ + c.JSON(http.StatusInternalServerError, map[string]any{ "ok": false, "error": err.Error(), }) @@ -70,7 +70,7 @@ func Search(c *context.APIContext) { } c.SetLinkHeader(int(count), opts.PageSize) - c.JSONSuccess(map[string]interface{}{ + c.JSONSuccess(map[string]any{ "ok": true, "data": results, }) |