diff options
author | Alan Pearce | 2024-05-18 20:23:27 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-18 20:23:27 +0200 |
commit | 7dc19d115c5f3b012f96284adc8cadb9b703d6db (patch) | |
tree | 663783920a624046fed7618dc1bdf1bbf389aaf3 /internal/builder/posts.go | |
parent | 9a10bbdb7ab8cb4da1002729b463ed9beca13858 (diff) | |
download | website-7dc19d115c5f3b012f96284adc8cadb9b703d6db.tar.lz website-7dc19d115c5f3b012f96284adc8cadb9b703d6db.tar.zst website-7dc19d115c5f3b012f96284adc8cadb9b703d6db.zip |
remove lint errors
Diffstat (limited to 'internal/builder/posts.go')
-rw-r--r-- | internal/builder/posts.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/builder/posts.go b/internal/builder/posts.go index 223531b..a4526e4 100644 --- a/internal/builder/posts.go +++ b/internal/builder/posts.go @@ -52,13 +52,17 @@ var markdown = goldmark.New( func getPost(filename string) (*PostMatter, []byte, error) { matter := PostMatter{} content, err := os.Open(filename) - defer content.Close() if err != nil { return nil, nil, errors.WithMessagef(err, "could not open post %s", filename) } + defer content.Close() rest, err := frontmatter.MustParse(content, &matter) if err != nil { - return nil, nil, errors.WithMessagef(err, "could not parse front matter of post %s", filename) + return nil, nil, errors.WithMessagef( + err, + "could not parse front matter of post %s", + filename, + ) } return &matter, rest, nil |