(n int, values interface{}, e encode.Encoder)
| 553 | } |
| 554 | |
| 555 | func encodeValues(n int, values interface{}, e encode.Encoder) [][]byte { |
| 556 | if values == nil { |
| 557 | return nil |
| 558 | } |
| 559 | |
| 560 | vals := make([][]byte, 0, n) |
| 561 | rvals := reflect.ValueOf(values) |
| 562 | |
| 563 | for i := 0; i < n; i++ { |
| 564 | v := getV(rvals, int32(i)) |
| 565 | bs := e.Encode(v) |
| 566 | vals = append(vals, bs) |
| 567 | } |
| 568 | return vals |
| 569 | } |
| 570 | |
| 571 | // newValueToKeep creates a slice indicating which key to keep. |
| 572 | // Value of key[i+1] with the same value with key[i] do not need to keep. |
no test coverage detected