changed all "log" and "fmt" to "slog" in package main

This commit is contained in:
2026-05-04 11:14:18 -06:00
parent 2edab08448
commit 1ed1571c9e
3 changed files with 35 additions and 21 deletions
+2 -3
View File
@@ -1,7 +1,7 @@
package main
import (
"log"
"log/slog"
"net/http"
)
@@ -11,8 +11,7 @@ func (s *Server) handlerRefresh(w http.ResponseWriter, req *http.Request) {
return
}
if err := s.c.Refresh(); err != nil {
// #log
log.Printf("refresh failed: %v", err)
slog.Error("refresh failed", "err", err)
http.Error(w, "refresh failed", http.StatusInternalServerError)
return
}