hugolib: Simplify

This commit is contained in:
Bjørn Erik Pedersen
2016-11-23 18:28:14 +01:00
parent f1ed89fec4
commit 4360452001
6 changed files with 13 additions and 32 deletions

View File

@@ -1351,11 +1351,7 @@ func (p *Page) saveSourceAs(path string, safe bool) error {
bc := make([]byte, b.Len(), b.Len())
copy(bc, b.Bytes())
err := p.saveSource(bc, path, safe)
if err != nil {
return err
}
return nil
return p.saveSource(bc, path, safe)
}
func (p *Page) saveSource(by []byte, inpath string, safe bool) (err error) {