Turn a CSV of questions and answers into a quiz game in your command line interface!
Table of Contents
The Golang CLI Quizzer will read in a quiz provided by a CSV file. The CSV file must be in "question,answer" format. The player will be provided with one question at a time providing feedback as to whether each answer was correct or not. At the end of the quiz, the player will be shown the number of questions they answered correctly and how many questions there were in total.
The CSV file defaults to "problems.csv", but the user can choose a different csv file by using the "-csv" flag followed by the name of the file.
The time limit defaults to 30 seconds, but the user can choose a different time limit by using the "-timer" flag followed by a time limit in seconds.
Your quiz will stop as soon as the time limit has exceeded. Any unanswered questions will be deemed incorrect once the time limit is reached.
- Golang: https://go.dev/doc/install
- Clone the repo
git clone https://github.com/cjsidler/go-cli-quizzer.git
- Build an executable
go build -o "go-cli-quizzer.exe" main.go
- Run the executable. Flags are optional. Default csv filename is "problems.csv". Default time limit is 30 (seconds).
.\go-cli-quizzer.exe -csv "my-quiz.csv" -timer 20
Contact me via email, LinkedIn, or GitHub: