Fix golint errors

This commit is contained in:
Menghan Li 2016-06-01 16:40:26 -07:00
parent b0b7afa173
commit fc590f40e9
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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 {