1
0
Fork 0
mirror of https://github.com/gohugoio/hugo.git synced 2025-03-24 03:33:45 +00:00
hugo/navigation
satotake 785a31b5b8
navigation: Cache and copy Menu for sorting
.Site.Menus is mutated when it is sorted for now and this causes concurrency problem ()
In this patch, each related sort function copies Menu before sorting to prevent
race condition.

Pages already have such a sort and cache logic and this patch is identical to it.

Closes 
2021-05-23 10:42:01 +02:00
..
menu.go navigation: Cache and copy Menu for sorting 2021-05-23 10:42:01 +02:00
menu_cache.go navigation: Cache and copy Menu for sorting 2021-05-23 10:42:01 +02:00
menu_cache_test.go navigation: Cache and copy Menu for sorting 2021-05-23 10:42:01 +02:00
pagemenus.go all: Format code with gofumpt 2020-12-03 13:12:58 +01:00