Updates for best practices
According to [the wiki](https://github.com/twitchtv/twirp/wiki/Best-Practices)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user