cleaner explination of outputs for 'http' and 'gui' functions

This commit is contained in:
Jeff Carr 2025-09-09 19:13:03 -05:00
parent d88cc3dd0d
commit 8a53184746
2 changed files with 4 additions and 9 deletions

View File

@ -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)

View File

@ -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, "}")