minor text
This commit is contained in:
parent
da3244d265
commit
4f114f7046
|
@ -34,10 +34,11 @@ func (pb *Files) makeHTTPFile(pf *File) error {
|
|||
return fmt.Errorf("failed to find struct %s", msg.GuiVarName)
|
||||
}
|
||||
FRUITS := msg.Name
|
||||
FRUIT := msg.GuiVarName
|
||||
fRUITS := untitle(FRUITS)
|
||||
// FRUIT := msg.GuiVarName
|
||||
// fruitVars := color.Vars
|
||||
httpSendReply(newf, FRUITS)
|
||||
httpCustom(newf, FRUITS, FRUIT, FRUIT)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +110,7 @@ func httpSendReply(w io.Writer, FRUITS string) {
|
|||
fmt.Fprintln(w, "}")
|
||||
}
|
||||
|
||||
func httpCustom(w io.Writer, FRUITS string, fRUITS string, FRUIT string) {
|
||||
func httpPost(w io.Writer, FRUITS string, fRUITS string) {
|
||||
fmt.Fprintln(w, "// Marshal protobuf, then http POST, then Unmarshal() to protobuf again")
|
||||
fmt.Fprintln(w, "func (p *"+FRUITS+") HttpPost(baseURL string, route string) (*"+FRUITS+", *httppb.HttpRequest, error) {")
|
||||
fmt.Fprintln(w, " data, err := p.Marshal()")
|
||||
|
@ -117,7 +118,8 @@ func httpCustom(w io.Writer, FRUITS string, fRUITS string, FRUIT string) {
|
|||
fmt.Fprintln(w, " return nil, nil, err")
|
||||
fmt.Fprintln(w, " }")
|
||||
fmt.Fprintln(w, "")
|
||||
fmt.Fprintln(w, " reqPB, err := httppb.DoPost(baseURL, route, data)")
|
||||
fmt.Fprintln(w, " tmp := filepath.Join(\""+fRUITS+"\",route)")
|
||||
fmt.Fprintln(w, " reqPB, err := httppb.DoPost(baseURL, tmp, data)")
|
||||
fmt.Fprintln(w, " if reqPB == nil {")
|
||||
fmt.Fprintln(w, " return nil, nil, err")
|
||||
fmt.Fprintln(w, " }")
|
||||
|
|
Loading…
Reference in New Issue