aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-06 10:07:26 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-06 10:07:26 +0800
commitf9e55bccc2e25b11fa809c4b0ecec658a1dfbea3 (patch)
tree27f3ec919e96b5300c904d76cca85f2d30b38765
parentDon't use humanize as a dependency (diff)
downloadforge-f9e55bccc2e25b11fa809c4b0ecec658a1dfbea3.tar.gz
forge-f9e55bccc2e25b11fa809c4b0ecec658a1dfbea3.tar.zst
forge-f9e55bccc2e25b11fa809c4b0ecec658a1dfbea3.zip
Don't report memory stats to the template
-rw-r--r--forged/internal/unsorted/http_handle_index.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/forged/internal/unsorted/http_handle_index.go b/forged/internal/unsorted/http_handle_index.go
index 339344e..a3141f4 100644
--- a/forged/internal/unsorted/http_handle_index.go
+++ b/forged/internal/unsorted/http_handle_index.go
@@ -5,9 +5,7 @@ package unsorted
import (
"net/http"
- "runtime"
- "github.com/dustin/go-humanize"
"go.lindenii.runxiyu.org/forge/forged/internal/web"
)
@@ -24,9 +22,5 @@ func (s *Server) httpHandleIndex(writer http.ResponseWriter, request *http.Reque
}
params["groups"] = groups
- // Memory currently allocated
- memstats := runtime.MemStats{} //exhaustruct:ignore
- runtime.ReadMemStats(&memstats)
- params["mem"] = humanize.IBytes(memstats.Alloc)
s.renderTemplate(writer, "index", params)
}