Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
github.com/vsantosalmeida/csv-parser
Is a Golang library to process csv files and normalize the data to an employee entity.
First execute the build of the bin file.
make build
Copy yours csv files to the bin directory.
cp *.csv ./bin
Run the binary with the -files params (each file separated by ,
).
cd bin
./csv-parser.bin -f=roster1.csv,roster2.csv
For each file will require an input with the name of the columns. Case your file don't have the column, just hit enter.
IMAGE
After the execution, if the files are processed with success one or both of that files will be created with the results.
employee-{timestamp}.json
badData-{timestamp}.json
Check coverage (will open in your browser the code coverage.)
make test cover-html
For this project, I choose to use a simple way to process the files, which is receiving from the input the structure of the CSV files. Thus ensuring in a better way that the parser will be able to interpret each file in the best way. As architecture, I use a pattern that in my opinion creates a better pattern in the structure of the project and ensures a more scalable code for any new feature. The clean architecture, which is a pattern to develop software independent of frameworks, UI, or any external technologies.
Clean Architecture by Elton Minetto
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.