bbustin / dmarc_aggregate_parser Goto Github PK
View Code? Open in Web Editor NEWParse DMARC aggregate reports
License: MIT License
Parse DMARC aggregate reports
License: MIT License
Hi @bbustin,
I have taken a longer look at parse_dir()
and I think there are a few issues with the function. As you mentioned you put this together while learning Rust. I myself am still learning Rust :). I would personally use it for my own small projects. But it has some issues when being considered for use in the larger more complex system.
The general approach I have used and seen used is something along the lines of the following dodgy pseudo code
for file in dir {
file = parse()
if file is ok {
Do any work that needs to be done.
If there is a problem log and report issue and move to the next file without making any system changes.
If the work completes successfully. Mark the file as processed or remove it.
} else {
log and report file as a problem
}
}
This basically is the long way of saying the parse_dir function is great for testing :) but not so much for production environment as I see things.
Hi,
I am interested in contributing to this repo. I was thinking of writing my own. But this seems to be a great place to start and contribute.
Some of the issues that I see in the code that I think I can help with.
panic
hard coded. I would like to remove this and make the function return a result
unwrap
s that might fail on a malformed xml file.directory
as a Path
in a nice way.I have already raised two PRs to address some very simple things.
test_parse_dir
by adding the #[should_panic]
See pr #3parse_reader
private as this does not need to be public in the current code.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.