浏览代码

Fix documentation of the encoder types

Evan Huus 10 年之前
父节点
当前提交
a92324bc51
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      utils.go

+ 4 - 4
utils.go

@@ -62,8 +62,8 @@ type Encoder interface {
 // make strings and byte slices encodable for convenience so they can be used as keys
 // and/or values in kafka messages
 
-// StringEncoder implements the Encoder interface for Go strings so that you can do things like
-//	producer.SendMessage(nil, sarama.StringEncoder("hello world"))
+// StringEncoder implements the Encoder interface for Go strings so that they can be used
+// as the Key or Value in a ProducerMessage.
 type StringEncoder string
 
 func (s StringEncoder) Encode() ([]byte, error) {
@@ -74,8 +74,8 @@ func (s StringEncoder) Length() int {
 	return len(s)
 }
 
-// ByteEncoder implements the Encoder interface for Go byte slices so that you can do things like
-//	producer.SendMessage(nil, sarama.ByteEncoder([]byte{0x00}))
+// ByteEncoder implements the Encoder interface for Go byte slices so that they can be used
+// as the Key or Value in a ProducerMessage.
 type ByteEncoder []byte
 
 func (b ByteEncoder) Encode() ([]byte, error) {