Don’t mask the named return values
The defer function is expecting an expression value, not a nil value, and therefore we shouldn’t override the named return values in the function.
This commit is contained in:
parent
fb256df42b
commit
abe117b7d3
1 changed files with 3 additions and 3 deletions
|
@ -854,7 +854,7 @@ func (p *parser) parsePath(expr ...Expr) (path *PathExpression, err error) {
|
|||
|
||||
part, err = p.parseStep()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return
|
||||
}
|
||||
|
||||
if part == nil {
|
||||
|
@ -877,7 +877,7 @@ func (p *parser) parsePath(expr ...Expr) (path *PathExpression, err error) {
|
|||
|
||||
join, err = p.parseJoin()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return
|
||||
}
|
||||
|
||||
if join == nil {
|
||||
|
@ -893,7 +893,7 @@ func (p *parser) parsePath(expr ...Expr) (path *PathExpression, err error) {
|
|||
|
||||
part, err = p.parseStep()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return
|
||||
}
|
||||
|
||||
if part == nil {
|
||||
|
|
Loading…
Reference in a new issue