/usr/share/gocode/src/github.com/smartystreets/goconvey/web/server/parser/parser.go is in golang-github-smartystreets-goconvey-dev 1.6.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | package parser
import (
"log"
"github.com/smartystreets/goconvey/web/server/contract"
)
type Parser struct {
parser func(*contract.PackageResult, string)
}
func (self *Parser) Parse(packages []*contract.Package) {
for _, p := range packages {
if p.Active() && p.HasUsableResult() {
self.parser(p.Result, p.Output)
} else if p.Ignored {
p.Result.Outcome = contract.Ignored
} else if p.Disabled {
p.Result.Outcome = contract.Disabled
} else {
p.Result.Outcome = contract.TestRunAbortedUnexpectedly
}
log.Printf("[%s]: %s\n", p.Result.Outcome, p.Name)
}
}
func NewParser(helper func(*contract.PackageResult, string)) *Parser {
self := new(Parser)
self.parser = helper
return self
}
|