Feat: styles and session

This commit is contained in:
Grail Finder
2025-05-02 12:34:58 +03:00
parent d18855cd49
commit cd1100d4b1
10 changed files with 164 additions and 13 deletions

View File

@ -1,19 +1,27 @@
package handlers
import (
"golias/config"
"golias/pkg/cache"
"html/template"
"log/slog"
"net/http"
"os"
)
var log *slog.Logger
var (
log *slog.Logger
cfg *config.Config
memcache cache.Cache
)
func init() {
log = slog.New(slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{
Level: slog.LevelDebug,
AddSource: true,
}))
memcache = cache.MemCache
cfg = config.LoadConfigOrDefault("")
}
var roundWords = map[string]string{