package handlers import ( "net/http" "nano-router/monitor" ) func HandleDashboard(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodGet { fail(w, http.StatusMethodNotAllowed, "method not allowed") return } data := monitor.GetData() ok(w, data) }