Updates for best practices

According to [the wiki](https://github.com/twitchtv/twirp/wiki/Best-Practices)
This commit is contained in:
sm
2018-01-20 08:38:58 -08:00
parent db3de8c61f
commit 039819c1f0
6 changed files with 20 additions and 17 deletions
+4 -2
View File
@@ -3,10 +3,12 @@ package hwt
import (
"context"
fmt "fmt"
pb "mcquay.me/hwt/rpc/hwt"
)
type Server struct{}
func (s *Server) Hello(ctx context.Context, req *HelloReq) (*HelloResp, error) {
return &HelloResp{Text: fmt.Sprintf("echo: %v", req.Subject)}, nil
func (s *Server) Hello(ctx context.Context, req *pb.HelloReq) (*pb.HelloResp, error) {
return &pb.HelloResp{Text: fmt.Sprintf("echo: %v", req.Subject)}, nil
}