From d667d8c26a677ec993758fe1bccf5f644b184257 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 19 Feb 2025 17:21:26 -0600 Subject: [PATCH] attempt a table string func --- doGui.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doGui.go b/doGui.go index 3bc8d29..a004f2a 100644 --- a/doGui.go +++ b/doGui.go @@ -80,6 +80,9 @@ func drawWindow(win *gadgets.BasicWindow) { grid.NewButton("me.machines.ShowTable()", func() { t := me.machines.NewTable("test 2") t.AddHostname() + t.AddStringFunc("sMB", func(m *zoopb.Machine) string { + return fmt.Sprintf("%d mb", m.Memory/(1024*1024)) + }) t.ShowTable() })