Simplify loops to copy (#19569)

- Simplify two loops into `copy` statements.
This commit is contained in:
Gusted authored and GitHub committed 2022-05-01 01:53:56 +02:00
1 parent 1597e2da3e
commit c0a6309a5f
2 files changed
+3 -6

No files matched your search

+1 -3
View File
@@ -76,9 +76,7 @@ func GetLanguages(ctx *context.APIContext) {
}
resp := make(languageResponse, len(langs))
for i, v := range langs {
resp[i] = v
}
copy(resp, langs)
ctx.JSON(http.StatusOK, resp)
}