secret-santa
This is a small project I wrote to help my family picking secret santas without having a person beeing involved. This way noone is left out of having fun.
The code first reads in the contacts.csv
file and picks random matches. Afterwards it uses this whatsapp libary to send massages to each person.
Setup
- Before running the code you need to prepare the
contacts.csv
file. In there you need to add lines for each participant of the your secret santa game. Add the name of the contact, followed by a semicolon and his or her phone number in the form0<international_calling_code>number
. An example looks like this:Thomas;049123456789
- Additionally, you need to set the
selfContactName
variable to the same name you gave yourself in thecontacts.csv
file. This way the message you send to yourself will not be deleted. - You might also need to set the
whatsappVersionMajor
,whatsappVersionMinor
andwhatsappVersionPatch
variables in themain.go
file
Running the code
To execute the code simply call
go mod *.go
and scan the QR code printed on the terminal with your phone.