aboutsummaryrefslogtreecommitdiff
path: root/cmd/monfront
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/monfront')
-rw-r--r--cmd/monfront/main.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/cmd/monfront/main.go b/cmd/monfront/main.go
index c56dafd..68138fc 100644
--- a/cmd/monfront/main.go
+++ b/cmd/monfront/main.go
@@ -7,7 +7,6 @@ import (
"fmt"
"html/template"
"io"
- "io/ioutil"
"log"
"log/slog"
"net"
@@ -139,18 +138,15 @@ func main() {
tmpl := template.New("main")
tmpl.Funcs(Funcs)
- files, err := ioutil.ReadDir(config.TemplatePath)
+ files, err := os.ReadDir(config.TemplatePath)
if err != nil {
log.Fatalf("could not read directory '%s': %s", config.TemplatePath, err)
}
for _, file := range files {
- if !file.Mode().IsRegular() {
- continue
- }
if !strings.HasSuffix(file.Name(), ".html") {
continue
}
- raw, err := ioutil.ReadFile(path.Join(config.TemplatePath, file.Name()))
+ raw, err := os.ReadFile(path.Join(config.TemplatePath, file.Name()))
if err != nil {
log.Fatalf("could not read file '%s': %s", path.Join(config.TemplatePath, file.Name()), err)
}