Reputation: 12867
The fmt
package has a Scan function that reads stdin, and writes consecutive space separated values to the variables you provide. Is there a way to use this with Slices, so that I could create a slice of sice n, and have scan read n values and put them into the slice?
Upvotes: 3
Views: 1677