improve package gcfg

This commit is contained in:
John Guo
2022-01-25 20:43:57 +08:00
parent adb4a1e6c0
commit 01b9fa8ac9
5 changed files with 91 additions and 12 deletions

View File

@ -65,6 +65,9 @@ func (err *Error) Code() gcode.Code {
if err == nil {
return gcode.CodeNil
}
if err.code == gcode.CodeNil {
return Code(err.Next())
}
return err.code
}