]> git.maquefel.me Git - brevno-suite/hugo/commit
Fix panic with debug.Dump with Page when running the server
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 26 Mar 2024 09:43:08 +0000 (10:43 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 26 Mar 2024 19:41:30 +0000 (20:41 +0100)
commit38e05bd3c7afdd676ac924222c66579978846b84
tree581de7ea19c43a32115082054189b795802ed4a7
parentebfca61ac4d4b62b3e4a50477826a85c06b44552
Fix panic with debug.Dump with Page when running the server

This replaces the current implementation with `json.MarshalIndent` which doesn't produce the same output, but at least it doesn't crash.

There's a bug in the upstream `litter` library. This can probably be fixed, but that needs to wait.

I have tested `go-spew` which does not crash, but it is very data racy in this context.

FIxes #12309
tpl/debug/debug.go
tpl/debug/debug_integration_test.go
tpl/debug/init.go