Skip to content

Add ExpectArrayLen / ReadFixedArray #1508

Closed
@vmihailenco

Description

@vmihailenco
func (r *Reader) ReadFixedArray(caller string, n int) error {
	got, err := r.ReadArrayLen()
	if err != nil {
		return err
	}
	if n != got {
		return fmt.Errorf("redis: %s: unexpected array length; want %d, got %d", caller, n, got)
	}
	return nil
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions