[PR #4940] [MERGED] refactor: append, build variable and type switch #17560

Closed
opened 2025-11-02 14:04:18 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4940
Author: @appleboy
Created: 9/15/2018
Status: Merged
Merged: 5/28/2019
Merged by: @appleboy

Base: masterHead: refactor2


📝 Commits (3)

  • c19281a refactor: append, build variable and type switch
  • 391e490 fix: remove redundant space.
  • 37b81ed Merge branch 'master' into refactor2

📊 Changes

8 files changed (+42 additions, -46 deletions)

View changed files

📝 integrations/links_test.go (+1 -1)
📝 models/issue_assignees_test.go (+1 -2)
📝 models/migrations/v64.go (+2 -2)
📝 models/user.go (+4 -6)
📝 modules/base/tool.go (+16 -16)
📝 modules/base/tool_test.go (+8 -8)
📝 modules/templates/helper.go (+6 -7)
📝 routers/user/auth_openid.go (+4 -4)

📄 Description

  1. append chains to the same slice that can be done in a single append call
  2. when predeclared identifiers shadowed in assignments
  3. loops that copy big objects during each iteration
  4. type switches that can benefit from type guard clause with a variable

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4940 **Author:** [@appleboy](https://github.com/appleboy) **Created:** 9/15/2018 **Status:** ✅ Merged **Merged:** 5/28/2019 **Merged by:** [@appleboy](https://github.com/appleboy) **Base:** `master` ← **Head:** `refactor2` --- ### 📝 Commits (3) - [`c19281a`](https://github.com/go-gitea/gitea/commit/c19281a3af6fd50c8ddf87c9f39c5f585a7d25a4) refactor: append, build variable and type switch - [`391e490`](https://github.com/go-gitea/gitea/commit/391e490871216188046c34335bfe31149a333387) fix: remove redundant space. - [`37b81ed`](https://github.com/go-gitea/gitea/commit/37b81eda1acbee9b82e2b795082b996dbe0372c0) Merge branch 'master' into refactor2 ### 📊 Changes **8 files changed** (+42 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `integrations/links_test.go` (+1 -1) 📝 `models/issue_assignees_test.go` (+1 -2) 📝 `models/migrations/v64.go` (+2 -2) 📝 `models/user.go` (+4 -6) 📝 `modules/base/tool.go` (+16 -16) 📝 `modules/base/tool_test.go` (+8 -8) 📝 `modules/templates/helper.go` (+6 -7) 📝 `routers/user/auth_openid.go` (+4 -4) </details> ### 📄 Description 1. `append` chains to the same slice that can be done in a single `append` call 2. when predeclared identifiers shadowed in assignments 3. loops that copy big objects during each iteration 4. type switches that can benefit from type guard clause with a variable --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 14:04:18 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17560