From 8a531847462cc62b1cd60c52b7226f64c191adfb Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Sep 2025 19:13:03 -0500 Subject: [PATCH] cleaner explination of outputs for 'http' and 'gui' functions --- generateGui.go | 2 +- generateHTTP.go | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/generateGui.go b/generateGui.go index 4da967e..69f27aa 100644 --- a/generateGui.go +++ b/generateGui.go @@ -49,7 +49,7 @@ func (pb *Files) makeGuiFile(pf *File) error { FRUIT := msg.GuiVarName fruitVars := color.Vars pf.generateAutoTablePB(newf, FRUITS, FRUIT, fruitVars) - log.Printf("NEED TO ADD GUI FOR %s with var %s and found msg struct %s\n", msg.Name, msg.GuiVarName, color.Lockname) + log.Printf("Added GUI functions for protobuf '%s' with record '%s' using mutex '%s'\n", msg.Name, msg.GuiVarName, color.Lockname) } } // os.Exit(-1) diff --git a/generateHTTP.go b/generateHTTP.go index 30d7e1d..db0ee30 100644 --- a/generateHTTP.go +++ b/generateHTTP.go @@ -29,17 +29,12 @@ func (pb *Files) makeHTTPFile(pf *File) error { for _, msg := range pf.allMsg() { if msg.DoHTTP { - color := pf.findMsg(msg.GuiVarName) - if color == nil { - return fmt.Errorf("failed to find struct %s", msg.GuiVarName) - } FRUITS := msg.Name fRUITS := untitle(FRUITS) - // FRUIT := msg.GuiVarName - // fruitVars := color.Vars + httpSendReply(newf, FRUITS) httpPost(newf, FRUITS, fRUITS) - log.Printf("NEED TO ADD GUI FOR %s with var %s and found msg struct %s\n", msg.Name, msg.GuiVarName, color.Lockname) + log.Printf("func (p *%s) HttpPost(baseURL string, route string) (*%s, *httppb.HttpRequest, error)\n", FRUITS, FRUITS) } } @@ -124,7 +119,7 @@ func httpPost(w io.Writer, FRUITS string, fRUITS string) { fmt.Fprintln(w, " return nil, nil, err") fmt.Fprintln(w, " }") fmt.Fprintln(w, "") - fmt.Fprintln(w, " newpb := New"+FRUITS+"()") + fmt.Fprintln(w, " newpb := new("+FRUITS+")") fmt.Fprintln(w, " err = newpb.Unmarshal(reqPB.ServerData)") fmt.Fprintln(w, " return newpb, reqPB, err") fmt.Fprintln(w, "}")