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