Skip to content

Commit

Permalink
chore: fix encodeArray comment removing wrong explanation (#2976)
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior authored Nov 29, 2022
1 parent 2fb4b08 commit bbd4796
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/scale/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ func (es *encodeState) encodeSlice(in interface{}) (err error) {
}

// encodeArray encodes an interface where the underlying type is an array
// it writes the encoded length of the Array to the Encoder, then encodes and writes each value in the Array
// it encodes and writes each value in the Array. Arrays of known size do not
// have the length prepended since you know the length when decoding
func (es *encodeState) encodeArray(in interface{}) (err error) {
v := reflect.ValueOf(in)
for i := 0; i < v.Len(); i++ {
Expand Down

0 comments on commit bbd4796

Please sign in to comment.