diff --git a/tools/celrpc/celrpc.go b/tools/celrpc/celrpc.go index 65492f1..d6ccd58 100644 --- a/tools/celrpc/celrpc.go +++ b/tools/celrpc/celrpc.go @@ -18,9 +18,9 @@ import ( "google.golang.org/grpc/reflection" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/emptypb" confpb "google.golang.org/genproto/googleapis/api/expr/conformance/v1alpha1" + epb "google.golang.org/protobuf/types/known/emptypb" ) // ConfClient manages calls to conformance test services. @@ -46,7 +46,7 @@ type grpcConfClient struct { // - one output line is expected, repeat again. type pipeConfClient struct { binary string - cmd_args []string + cmdArgs []string cmd *exec.Cmd stdOut *bufio.Reader stdIn io.Writer @@ -139,7 +139,7 @@ func NewPipeClient(serverCmd string, base64Encode bool, pingsEnabled bool) (Conf return &c, fmt.Errorf("server cmd '%s' invalid", serverCmd) } c.binary = fields[0] - c.cmd_args = fields[1:] + c.cmdArgs = fields[1:] return &c, c.reset() } @@ -149,7 +149,7 @@ func (c *pipeConfClient) reset() error { if c.binary == "" { return errors.New("reset on invalid pipe service configuration") } - cmd := exec.Command(c.binary, c.cmd_args...) + cmd := exec.Command(c.binary, c.cmdArgs...) out, err := cmd.StdoutPipe() if err != nil { return err @@ -171,7 +171,7 @@ func (c *pipeConfClient) reset() error { } func (c *pipeConfClient) isAlive() bool { - m := emptypb.Empty{} + m := epb.Empty{} err := c.pipeCommand("ping", &m, &m) return err == nil } diff --git a/tools/celrpc/testpipeimpl/main/main.go b/tools/celrpc/testpipeimpl/main/main.go index e05567f..42f6e5e 100644 --- a/tools/celrpc/testpipeimpl/main/main.go +++ b/tools/celrpc/testpipeimpl/main/main.go @@ -15,11 +15,11 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/emptypb" confpb "google.golang.org/genproto/googleapis/api/expr/conformance/v1alpha1" exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1" statuspb "google.golang.org/genproto/googleapis/rpc/status" + epb "google.golang.org/protobuf/types/known/emptypb" ) type codec struct { @@ -188,12 +188,12 @@ func processLoop() int { return 1 } case "ping": - req := emptypb.Empty{} + req := epb.Empty{} if err := c.unmarshal(msg, &req); err != nil { fmt.Fprintf(os.Stderr, "bad ping req: %v\n", err) return 1 } - resp := emptypb.Empty{} + resp := epb.Empty{} if err = c.serialize(writer, &resp); err != nil { fmt.Fprintf(os.Stderr, "error serializing ping resp %v\n", err) return 1