1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| {% import ( "runtime"
"{{{ .Package }}}/app" "{{{ .Package }}}/app/controller/cutil" "{{{ .Package }}}/views/components" "{{{ .Package }}}/views/layout" ) %}
{% code type MemUsage struct { layout.Basic Mem *runtime.MemStats } %}
{% func (p *MemUsage) Body(as *app.State, ps *cutil.PageState) %} <div class="card"> <h3>Memory Usage</h3> <em>Better formatting is coming soon</em> {%s= components.JSON(p.Mem) %} </div> {% endfunc %}
|