[ci skip] Small nit-picking

This commit is contained in:
Hoang Nguyen 2023-07-12 00:00:00 +07:00
parent 51cf764861
commit 28a6edcaf4
Signed by: folliehiyuki
GPG Key ID: B0567C20730E9B11
1 changed files with 1 additions and 2 deletions

View File

@ -44,7 +44,7 @@ func getEntries(dirPath string) ([]Entry, error) {
// Output an index.html file listing entries to a specified destination
func renderIndexHTML(entries []Entry, dest string) error {
tmpl, err := template.New("index.html").Parse(indexTemplate)
tmpl, err := template.New(dest).Parse(indexTemplate)
if err != nil {
return err
}
@ -58,7 +58,6 @@ func renderIndexHTML(entries []Entry, dest string) error {
Entries []Entry
}{Path: dirPath, Entries: entries}
// Open the destination index.html file
destFile, err := os.Create(path.Join(dest, "index.html"))
if err != nil {
return err