refactor: Simplify and modernize loops (#1522)

* refactor: Simplify loops

* refactor: Modernize loops using range over int

---------

Co-authored-by: TwiN <twin@linux.com>
This commit is contained in:
PythonGermanyandTwiN authored and GitHub committed 2026-02-08 19:08:59 -05:00
1 parent e5b4e0d381
commit f09d959c97
17 files changed
+45 -78

No files matched your search

-10
View File
@@ -4,13 +4,3 @@ package config
func toPtr[T any](value T) *T {
return &value
}
// contains checks if a key exists in the slice
func contains[T comparable](slice []T, key T) bool {
for _, item := range slice {
if item == key {
return true
}
}
return false
}