mirror of https://github.com/markbates/pkger.git
Add missing error handling
It looks like these checks were just forgotten. Should we intentionally ignore errors here, we should probably unassign err.
This commit is contained in:
parent
0273362499
commit
1795d15837
|
@ -84,6 +84,9 @@ func (p *Parser) ParseFile(abs string, mode parser.Mode) (*ParsedSource, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.Path, err = s.Here.Parse(strings.TrimPrefix(abs, dir))
|
s.Path, err = s.Here.Parse(strings.TrimPrefix(abs, dir))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return p.ParseSource(s, 0)
|
return p.ParseSource(s, 0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,5 +57,5 @@ func Stuff(w io.Writer, c here.Info, decls parser.Decls) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = w.Write(b)
|
_, err = w.Write(b)
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue