Skip to content

Commit

Permalink
Fix linter findings. (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthntatum authored Sep 7, 2022
1 parent 9bb3c9d commit 2cfa4f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tools/celrpc/celrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ func (c *pipeConfClient) marshal(in proto.Message) (string, error) {
return "", err
}
return base64.StdEncoding.EncodeToString(bytes), nil
} else {
return protojson.MarshalOptions{}.Format(in), nil
}

return protojson.MarshalOptions{}.Format(in), nil
}

func (c *pipeConfClient) unmarshal(encoded string, out proto.Message) error {
Expand All @@ -197,9 +197,9 @@ func (c *pipeConfClient) unmarshal(encoded string, out proto.Message) error {
return err
}
return proto.Unmarshal(protoBytes, out)
} else {
return protojson.Unmarshal([]byte(encoded), out)
}

return protojson.Unmarshal([]byte(encoded), out)
}

func (c *pipeConfClient) pipeCommand(cmd string, in proto.Message, out proto.Message) error {
Expand Down
8 changes: 4 additions & 4 deletions tools/celrpc/testpipeimpl/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func (c *codec) marshal(in proto.Message) (string, error) {
return "", err
}
return base64.StdEncoding.EncodeToString(bytes), nil
} else {
return protojson.MarshalOptions{}.Format(in), nil
}

return protojson.MarshalOptions{}.Format(in), nil
}

func (c *codec) unmarshal(encoded string, out proto.Message) error {
Expand All @@ -44,9 +44,9 @@ func (c *codec) unmarshal(encoded string, out proto.Message) error {
return err
}
return proto.Unmarshal(protoBytes, out)
} else {
return protojson.Unmarshal([]byte(encoded), out)
}

return protojson.Unmarshal([]byte(encoded), out)
}

func (c *codec) serialize(w *bufio.Writer, out proto.Message) error {
Expand Down

0 comments on commit 2cfa4f6

Please sign in to comment.