Example #1
0
func buildResults(e elements, r *modules.Result, matches int) (buf []byte, err error) {
	r.Success = true
	if matches > 0 {
		r.FoundAnything = true
	}
	r.Elements = e
	endCounters()
	r.Statistics = stats
	buf, err = json.Marshal(r)
	return
}
Example #2
0
File: pkg.go Project: zaktwo/mig
func buildResults(e elements, r *modules.Result) (buf []byte, err error) {
	r.Success = true
	r.Elements = e
	if len(e.Packages) > 0 {
		r.FoundAnything = true
	}
	endCounters()
	r.Statistics = stats
	buf, err = json.Marshal(r)
	return
}