stop using ioutil

Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
Naman Sood 2021-02-19 18:02:02 -05:00
parent f223051b68
commit 038695d123
2 changed files with 4 additions and 5 deletions

View file

@ -3,7 +3,7 @@ package main
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"github.com/aymerick/raymond"
"github.com/mitchellh/mapstructure"
@ -31,7 +31,7 @@ type Page struct {
}
func newPage(slug string) (*Page, error) {
data, err := ioutil.ReadFile("posts/" + slug + ".md")
data, err := os.ReadFile("posts/" + slug + ".md")
if err != nil {
return nil, fmt.Errorf("could not read file: %s", err)
}