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 }
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 }