Skip to content

esslam-ashour/go-quiz-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoQuizCLI

Screenshot 2023-12-26 at 2 52 46 AM

A simple quiz CLI app made using Go.

Usage:

First, quiz.go needs to be compiled, run the following command inside the directory:

go build quiz.go

Then, we can use the program as follows:

goquiz [flags]

The flags are:

-pfile=<string>                     this is the name of the problems CSV file (default is "problems.csv")
-duration=<int>                     this is the duration of the quiz in seconds (default is 30 seconds)
-shuffle=<bool>                     this is the option to shuffle problems (default is false)

Example:

goquiz -pfile="quiz_problems.csv" -duration=130 -shuffle=true

Skills I learned:

  • Go: utilized Go for the development of the program
  • File handling and CSV parsing: utilized the encoding package in order to parse CSV files
  • Error handling: ensured errors are handled and explicit when possible, especially errors resulting from invalid user input
  • Concurrent programming: utilized goroutines and channels for simultaneous user input and timer management

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages