Parse creates a new formatter that reads the go test output from the input reader, formats it and writes to the output according to the passed configuration. The result are three channels: the prefix text before any recognized action, the download channel will receive either zero or one result and t
( evts <-chan tokenizer.Event, )
| 17 | // zero or one result and then be closed. Once the downloads channel is closed the parsed package results will be |
| 18 | // streamed over the second result. |
| 19 | func Parse( |
| 20 | evts <-chan tokenizer.Event, |
| 21 | ) (<-chan string, <-chan *Downloads, <-chan *Package) { |
| 22 | prefixChannel := make(chan string) |
| 23 | downloadsChannel := make(chan *Downloads) |
| 24 | downloadsFailureReason := make(chan string) |
| 25 | packagesChannel := make(chan *Package) |
| 26 | go parse(evts, prefixChannel, downloadsChannel, downloadsFailureReason, packagesChannel) |
| 27 | return prefixChannel, downloadsChannel, packagesChannel |
| 28 | } |
| 29 | |
| 30 | var downloadErrors = []*regexp.Regexp{ |
| 31 | regexp.MustCompile(`no required module provides package (?P<package>[^\s]+);`), |