24 lines
358 B
Go
24 lines
358 B
Go
package page
|
|
|
|
import (
|
|
"log/slog"
|
|
|
|
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/filesystem"
|
|
)
|
|
|
|
type Service struct {
|
|
fs filesystem.FS
|
|
}
|
|
|
|
func New(fs filesystem.FS) *Service {
|
|
info, err := fs.ReadDir("/")
|
|
if err != nil {
|
|
slog.Error("could not read dir", "err", err)
|
|
}
|
|
|
|
slog.Info("file info", "info", info)
|
|
return &Service{
|
|
fs: fs,
|
|
}
|
|
}
|