Tokenize starts a reader of Event in the background that reads until the input is closed. This method starts a goroutine in the background and should be stopped by closing the input reader.
(input io.Reader)
| 15 | // Tokenize starts a reader of Event in the background that reads until the input is closed. This method starts a |
| 16 | // goroutine in the background and should be stopped by closing the input reader. |
| 17 | func Tokenize(input io.Reader) <-chan Event { |
| 18 | output := make(chan Event) |
| 19 | go decode(input, output) |
| 20 | return output |
| 21 | } |
| 22 | |
| 23 | type state string |
| 24 |