log/slog: make hex a const

hex is in fact immutable, declare it as a const to avoid accidental
modification, also for consistency with other packages.
This commit is contained in:
Jes Cok 2023-11-11 09:25:45 +08:00
parent 3188758653
commit 08712be2d4
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ func appendEscapedJSONString(buf []byte, s string) []byte {
return buf
}
var hex = "0123456789abcdef"
const hex = "0123456789abcdef"
// Copied from encoding/json/tables.go.
//