[PR #1433] [CLOSED] convert old for loops to range functions #1606

Closed
opened 2026-05-07 01:02:52 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/1433
Author: @JoshGuarino
Created: 8/24/2025
Status: Closed

Base: mainHead: range-functions


📝 Commits (1)

  • afd931e convert old for loops to range functions

📊 Changes

15 files changed (+68 additions, -68 deletions)

View changed files

📝 server/file_cache_test.go (+2 -2)
📝 server/message_cache_test.go (+4 -4)
📝 server/server_account_test.go (+2 -2)
📝 server/server_payments_test.go (+3 -3)
📝 server/server_test.go (+32 -32)
📝 server/topic.go (+1 -1)
📝 server/webpush_store_test.go (+1 -1)
📝 test/util.go (+2 -2)
📝 tools/loadgen/main.go (+2 -2)
📝 user/manager_test.go (+3 -3)
📝 util/batching_queue_test.go (+2 -2)
📝 util/limit.go (+1 -1)
📝 util/sprig/dict.go (+1 -1)
📝 util/sprig/list.go (+11 -11)
📝 util/sprig/strings.go (+1 -1)

📄 Description

Since this project tries to use the latest go version, I thought it prudent to update some the old for loops what can be converted to using range function. Language server was giving warnings for loop can be modernized using range over int so I figured I would do some of this cleanup work.


🔄 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/binwiederhier/ntfy/pull/1433 **Author:** [@JoshGuarino](https://github.com/JoshGuarino) **Created:** 8/24/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `range-functions` --- ### 📝 Commits (1) - [`afd931e`](https://github.com/binwiederhier/ntfy/commit/afd931e4a7736c8b0c4d30954d947907d49dcaef) convert old for loops to range functions ### 📊 Changes **15 files changed** (+68 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `server/file_cache_test.go` (+2 -2) 📝 `server/message_cache_test.go` (+4 -4) 📝 `server/server_account_test.go` (+2 -2) 📝 `server/server_payments_test.go` (+3 -3) 📝 `server/server_test.go` (+32 -32) 📝 `server/topic.go` (+1 -1) 📝 `server/webpush_store_test.go` (+1 -1) 📝 `test/util.go` (+2 -2) 📝 `tools/loadgen/main.go` (+2 -2) 📝 `user/manager_test.go` (+3 -3) 📝 `util/batching_queue_test.go` (+2 -2) 📝 `util/limit.go` (+1 -1) 📝 `util/sprig/dict.go` (+1 -1) 📝 `util/sprig/list.go` (+11 -11) 📝 `util/sprig/strings.go` (+1 -1) </details> ### 📄 Description Since this project tries to use the latest go version, I thought it prudent to update some the old for loops what can be converted to using range function. Language server was giving warnings `for loop can be modernized using range over int` so I figured I would do some of this cleanup work. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:02:52 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1606
No description provided.