winlogbeat/sys/winevent: use reflect IsZero method#29190
Conversation
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
andrewkroh
left a comment
There was a problem hiding this comment.
LGTM. Nice bit of code reduction. I think that code predated the existence of IsZero.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
|
Yeah. I checked that, I think by a couple of years. I would have preferred to just do |
(cherry picked from commit 180e7f3)
* upstream/master: [libbeat] Fix add_labels flattening of arrays values (elastic#29211) Change elastic-agent pprof default to false (elastic#29155) elastic#28472 fix flaky tests in libbeat fmtstr to use time.UTC instead of time.Local (elastic#28473) Adopt `parsers` in Filebeat's journald input (elastic#29070) [Elastic Agent] Add process error handling guidelines (elastic#29152) winlogbeat/sys/winevent: use reflect IsZero method (elastic#29190) Remove Journalbeat (elastic#29131) Add note that there is no warranty or support for generator code (elastic#28797) packetbeat: preparation for npcap addition (elastic#29017) Use the generic helper for opening file to read in filestream (elastic#29180) Workflow for macos (elastic#29174) Fix `decode_json_fields` processor to always add error key (elastic#29107)
What does this PR do?
Replace logic required to check whether a value is zero with the standard library method.
Why is it important?
Reduces line count. The previous logic was needed as it was added prior to the reflect IsZero method's addition, but now it is not.
Checklist
- [ ] I have commented my code, particularly in hard-to-understand areas- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added an entry inCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Author's Checklist
No specific checks.
How to test this PR locally
Run
go testin github.com/elastic/beats/v7/winlogbeat/sys/winevent.Related issues
N/A
Use cases
Screenshots
N/A
Logs
N/A