diff --git a/server.go b/server.go index d3a8073d9..52c1bb72e 100644 --- a/server.go +++ b/server.go @@ -115,12 +115,14 @@ func CustomCodec(codec Codec) ServerOption { } } +// RPCCompressor returns a ServerOption that sets a compressor for outbound message. func RPCCompressor(cp Compressor) ServerOption { return func(o *options) { o.cp = cp } } +// RPCDecompressor returns a ServerOption that sets a decompressor for inbound message. func RPCDecompressor(dc Decompressor) ServerOption { return func(o *options) { o.dc = dc diff --git a/trace.go b/trace.go index cde04fbfc..f6747e1df 100644 --- a/trace.go +++ b/trace.go @@ -101,9 +101,8 @@ type payload struct { func (p payload) String() string { if p.sent { return fmt.Sprintf("sent: %v", p.msg) - } else { - return fmt.Sprintf("recv: %v", p.msg) } + return fmt.Sprintf("recv: %v", p.msg) } type fmtStringer struct {