summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generateGui.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/generateGui.go b/generateGui.go
index 63dabd7..7699e1c 100644
--- a/generateGui.go
+++ b/generateGui.go
@@ -109,8 +109,9 @@ func headerGui(w io.Writer, pf *File) {
fmt.Fprintln(w, " \"time\"")
fmt.Fprintln(w, "")
fmt.Fprintln(w, " \"go.wit.com/gui\"")
- fmt.Fprintln(w, " \"go.wit.com/lib/protobuf/guipb\"")
fmt.Fprintln(w, " \"go.wit.com/log\"")
+ fmt.Fprintln(w, " \"go.wit.com/lib/cobol\"")
+ fmt.Fprintln(w, " \"go.wit.com/lib/protobuf/guipb\"")
fmt.Fprintln(w, " anypb \"google.golang.org/protobuf/types/known/anypb\"")
fmt.Fprintln(w, " timestamppb \"google.golang.org/protobuf/types/known/timestamppb\"")
fmt.Fprintln(w, ")")
@@ -127,6 +128,12 @@ func guiMain(w io.Writer, FRUITS string, FRUIT string) {
fmt.Fprintln(w, " return t")
fmt.Fprintln(w, "}")
fmt.Fprintln(w, "")
+ fmt.Fprintln(w, "// formats & prints the table as text to Stdout. a real timesaver!")
+ fmt.Fprintln(w, "func (t *"+FRUITS+"Table) PrintTable() {")
+ fmt.Fprintln(w, " t.MakeTable()")
+ fmt.Fprintln(w, " cobol.PrintTable(t.pb)")
+ fmt.Fprintln(w, "}")
+ fmt.Fprintln(w, "")
fmt.Fprintln(w, "// force the application to choose the type of data. this allows the GUI plugin to be smarter")
fmt.Fprintln(w, "func (t *"+FRUITS+"Table) AddStringFunc(title string, f func(*"+FRUIT+") string) *"+FRUIT+"AnyFunc {")
fmt.Fprintln(w, " t.pb.Order = append(t.pb.Order, title)")