fix parameter order in error type comparison

This commit is contained in:
Marco Vito Moscaritolo 2024-11-11 14:04:21 +01:00 committed by Mike Farah
parent 7eef1a454e
commit 3ce266bfa0

View File

@ -286,7 +286,7 @@ func (dec *tomlDecoder) processTable(currentNode *toml.Node) (bool, error) {
} }
runAgainstCurrentExp, err = dec.decodeKeyValuesIntoMap(tableNodeValue, tableValue) runAgainstCurrentExp, err = dec.decodeKeyValuesIntoMap(tableNodeValue, tableValue)
if err != nil && !errors.Is(io.EOF, err) { if err != nil && !errors.Is(err, io.EOF) {
return false, err return false, err
} }
} }
@ -343,7 +343,7 @@ func (dec *tomlDecoder) processArrayTable(currentNode *toml.Node) (bool, error)
tableValue := dec.parser.Expression() tableValue := dec.parser.Expression()
runAgainstCurrentExp, err := dec.decodeKeyValuesIntoMap(tableNodeValue, tableValue) runAgainstCurrentExp, err := dec.decodeKeyValuesIntoMap(tableNodeValue, tableValue)
log.Debugf("table node err: %w", err) log.Debugf("table node err: %w", err)
if err != nil && !errors.Is(io.EOF, err) { if err != nil && !errors.Is(err, io.EOF) {
return false, err return false, err
} }
c := Context{} c := Context{}