all: fix docstrings

This commit is contained in:
Martin Holst Swende
2022-10-04 09:18:02 +02:00
parent ea26fc8a6c
commit ee301c750b
48 changed files with 110 additions and 95 deletions
+1 -1
View File
@@ -381,7 +381,7 @@ func (w EncoderBuffer) WriteBytes(b []byte) {
w.buf.writeBytes(b)
}
// WriteBytes encodes s as an RLP string.
// WriteString encodes s as an RLP string.
func (w EncoderBuffer) WriteString(s string) {
w.buf.writeString(s)
}
+4 -1
View File
@@ -29,8 +29,11 @@ import (
var (
// Common encoded values.
// These are useful when implementing EncodeRLP.
// EmptyString is the encoding of an empty string.
EmptyString = []byte{0x80}
EmptyList = []byte{0xC0}
// EmptyList is the encoding of an empty list.
EmptyList = []byte{0xC0}
)
var ErrNegativeBigInt = errors.New("rlp: cannot encode negative big.Int")
+1 -1
View File
@@ -44,7 +44,7 @@ type Type struct {
Elem *Type // non-nil for Kind values of Ptr, Slice, Array
}
// defaultNilValue determines whether a nil pointer to t encodes/decodes
// DefaultNilValue determines whether a nil pointer to t encodes/decodes
// as an empty string or empty list.
func (t Type) DefaultNilValue() NilKind {
k := t.Kind