Skip to content

Commit

Permalink
fix: fix G601, Implicit memory aliasing in for loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Jan 5, 2024
1 parent a8cf30d commit 939551f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/pages/home/bookmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func GenerateBookmarkTemplate(filter string) template.HTML {
if len(bookmarksData.Categories) > 0 {
defaultCategory := bookmarksData.Categories[0]
for _, category := range bookmarksData.Categories {
tpl += renderBookmarksWithCategories(&bookmarks, &category, &defaultCategory, options.OpenBookmarkNewTab, options.EnableEncryptedLink, options.IconMode)
categoryCopy := category
tpl += renderBookmarksWithCategories(&bookmarks, &categoryCopy, &defaultCategory, options.OpenBookmarkNewTab, options.EnableEncryptedLink, options.IconMode)
}
} else {
tpl += renderBookmarksWithoutCategories(&bookmarks, options.OpenBookmarkNewTab, options.EnableEncryptedLink, options.IconMode)
Expand Down

0 comments on commit 939551f

Please sign in to comment.