mirror of
https://github.com/golang/go
synced 2024-09-28 18:14:29 -06:00
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:
parent
3188758653
commit
08712be2d4
@ -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.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user