MCPcopy Create free account
hub / github.com/GoTestTools/gotestfmt / Parse

Function Parse

parser/parse.go:19–28  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

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.
19func 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
30var downloadErrors = []*regexp.Regexp{
31 regexp.MustCompile(`no required module provides package (?P<package>[^\s]+);`),

Callers 2

TestParseFunction · 0.92

Calls 1

parseFunction · 0.85

Tested by 1

TestParseFunction · 0.74