gogo / letmegrpc

[maintainer wanted] generates a web form gui from a grpc specification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no buildable Go source files error

JalfResi opened this issue · comments

$ letmegrpc --addr=localhost:12345 --port=10000 --proto_path=./:../ ./protobuf/proxygroup.proto
2015/07/25 21:33:37 main.go:3:8: no buildable Go source files in /var/folders/_n/hr82ybg110jbm8ytkqygh6zw0000gn/T/letmegrpc_c25416e49fd6e592/src/tmpprotos
exit status 1

running the above command with options results in the above error. Any suggestions? Anything you need for me to diagnose further?

letmegrpc is not clever enough to handle multiple proto paths.
Rather try using protoc
protoc -letmegrpc_out=. grpc.proto
And then writing a little bit of go code that uses the generated code to build your server.
Basically look at the customization section.
I hope this helps.

Ah yes it does! Got it working with the following:

protoc -I ./protobuf --proto_path=../ ./protobuf/proxygroup.proto --letmegrpc_out=./proxygroup

Then I created a small file like so:

package main

import tmpprotos "proxygroupd/proxygroup"

func main() {
    tmpprotos.Serve("localhost:12345", "localhost:10000", tmpprotos.DefaultHtmlStringer)
}

Ran go build and ta-da! a nice working server to test my micro-service!

Thanks!

Good work.
My pleasure :)