You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reviewing the python documentation, one can get the module outputs. How does one access this structure when using golang as Scan returns the matching rules without the module outputs (as far as I can tell)?
// Scan scans the provided data with the Rules associated to the Scanner.
func (s *Scanner) Scan(buf []byte) ([]*Rule, error) {
var ptr *C.uint8_t
// When `buf` is an empty slice `ptr` will be nil. That's ok, because
// yrx_scanner_scan allows the data pointer to be null as long as the data
// size is 0.
if len(buf) > 0 {
ptr = (*C.uint8_t)(unsafe.Pointer(&(buf[0])))
}
s.matchingRules = nil
runtime.LockOSThread()
defer runtime.UnlockOSThread()
var err error
switch r := C.yrx_scanner_scan(s.cScanner, ptr, C.size_t(len(buf))); r {
case C.SUCCESS:
err = nil
case C.SCAN_TIMEOUT:
err = ErrTimeout
default:
err = errors.New(C.GoString(C.yrx_last_error()))
}
return s.matchingRules, err
}
The text was updated successfully, but these errors were encountered:
Reviewing the python documentation, one can get the module outputs. How does one access this structure when using golang as
Scan
returns the matching rules without the module outputs (as far as I can tell)?The text was updated successfully, but these errors were encountered: