Lint fixes.

This commit is contained in:
2024-11-01 10:10:42 +02:00
parent ef3f009709
commit a0563074ed
9 changed files with 42 additions and 49 deletions

View File

@@ -67,7 +67,7 @@ func SaveToFile(rootPath string, s *Snapshot, done chan struct{}) {
urlPath := s.URL.Path
// If path is empty, add `index.gmi` as the file to save
if urlPath == "" || urlPath == "." {
urlPath = fmt.Sprintf("index.gmi")
urlPath = "index.gmi"
}
// If path ends with '/' then add index.gmi for the
// directory to be created.