hello, so i’m new to golang.i need to filter 2 information that i’ve. first incorporates record of emails (like 2 Million ish) and second incorporates e mail:hash (about 500k ish). i need to examine each information line by line if e mail 2nd file in in first file than i need to export that e mail:hash in to third file. E.g
testemail@take a look at.com take a look email@example.com take a look firstname.lastname@example.org take a look email@example.com take a look firstname.lastname@example.org
take a look email@example.com:53534535$5435345 take a look firstname.lastname@example.org:23534535$5864345 email@example.com:23534535$586745 firstname.lastname@example.org:23534535$5864345
it ought to output a 3rd file with contents
take a look email@example.com:53534535$5435345 take a look firstname.lastname@example.org:23534535$5864345
emails which can be current in first file.
Hello! Are the 2 information ordered? (At the very least the second?) From what I see: no. Proper?
Properly, there are various methods to do this:
- First file2 and create a dictionary with e mail addr as key.
- Cross this dictionary to a routine that learn file1 and search the present line within the map. It it’s discovered, write it to 3rd file
You should use goroutines and channels.
hiya, they aren’t ordered.
My resolution, attempt it. Compile and run giving it mails file, mails&hash file and output file paths
@Metalymph ty mate. you’re a savior.