cleaner explination of outputs for 'http' and 'gui' functions
This commit is contained in:
parent
d88cc3dd0d
commit
8a53184746
|
@ -49,7 +49,7 @@ func (pb *Files) makeGuiFile(pf *File) error {
|
||||||
FRUIT := msg.GuiVarName
|
FRUIT := msg.GuiVarName
|
||||||
fruitVars := color.Vars
|
fruitVars := color.Vars
|
||||||
pf.generateAutoTablePB(newf, FRUITS, FRUIT, fruitVars)
|
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)
|
// os.Exit(-1)
|
||||||
|
|
|
@ -29,17 +29,12 @@ func (pb *Files) makeHTTPFile(pf *File) error {
|
||||||
|
|
||||||
for _, msg := range pf.allMsg() {
|
for _, msg := range pf.allMsg() {
|
||||||
if msg.DoHTTP {
|
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 := msg.Name
|
||||||
fRUITS := untitle(FRUITS)
|
fRUITS := untitle(FRUITS)
|
||||||
// FRUIT := msg.GuiVarName
|
|
||||||
// fruitVars := color.Vars
|
|
||||||
httpSendReply(newf, FRUITS)
|
httpSendReply(newf, FRUITS)
|
||||||
httpPost(newf, FRUITS, 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, " return nil, nil, err")
|
||||||
fmt.Fprintln(w, " }")
|
fmt.Fprintln(w, " }")
|
||||||
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, " err = newpb.Unmarshal(reqPB.ServerData)")
|
||||||
fmt.Fprintln(w, " return newpb, reqPB, err")
|
fmt.Fprintln(w, " return newpb, reqPB, err")
|
||||||
fmt.Fprintln(w, "}")
|
fmt.Fprintln(w, "}")
|
||||||
|
|
Loading…
Reference in New Issue