Use string instead of []byte for data to better use JSON payloads
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
75e9a42a51
commit
45fd96bd05
4
main.go
4
main.go
|
@ -25,7 +25,7 @@ import (
|
||||||
|
|
||||||
type Job struct {
|
type Job struct {
|
||||||
PasteID string
|
PasteID string
|
||||||
Data []byte
|
Data string
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -211,7 +211,7 @@ func worker(rules *yara.Rules, jobs chan Job) {
|
||||||
func processJob(s *yara.Scanner, job Job) {
|
func processJob(s *yara.Scanner, job Job) {
|
||||||
var m yara.MatchRules
|
var m yara.MatchRules
|
||||||
|
|
||||||
err := s.SetCallback(&m).ScanMem(job.Data)
|
err := s.SetCallback(&m).ScanMem([]byte(job.Data))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue