Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 471 Bytes

toslice.md

File metadata and controls

29 lines (19 loc) · 471 Bytes

ToSlice Operator

Overview

Transform the Observable items into a slice. It accepts a capacity that will be used as the initial capacity of the slice produced.

Example

s, err := rxgo.Just(1, 2, 3)().ToSlice(3)
if err != nil {
	return err
}
fmt.Println(s)

Output:

[1 2 3]

Options