mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Addition of 'LvlDiscard Lvl = -1' at beginning of const block in commit e699254142 caused the iota assigned values of LvlCrit through LvlTrace to change from 0 to 5 to 1 to 6. (#815)
This restores the original enumerated const values by moving LvlDiscard after all the iota assigned constants. Usage of auto-increment enumerations does not work the same way in golang as it does in C/C++ and its behaviour is detailed in the link below. https://go.dev/ref/spec#Iota
This commit is contained in:
parent
b6de7aaf17
commit
3274b3bce7
1 changed files with 2 additions and 2 deletions
|
|
@ -18,13 +18,13 @@ const skipLevel = 2
|
||||||
type Lvl int
|
type Lvl int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LvlDiscard Lvl = -1
|
LvlCrit Lvl = iota
|
||||||
LvlCrit Lvl = iota
|
|
||||||
LvlError
|
LvlError
|
||||||
LvlWarn
|
LvlWarn
|
||||||
LvlInfo
|
LvlInfo
|
||||||
LvlDebug
|
LvlDebug
|
||||||
LvlTrace
|
LvlTrace
|
||||||
|
LvlDiscard Lvl = -1
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlignedString returns a 5-character string containing the name of a Lvl.
|
// AlignedString returns a 5-character string containing the name of a Lvl.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue