quiz-game

command
v0.0.0-...-4d49a20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 7 Imported by: 0

README

Quiz Game

Create a program to run timed quizes via the command line.

Run Commands:

  • go build .
  • quiz-game.exe (executes application with default flags)
  • go build. && quiz-game.exe
  • quiz-game.exe -h or --help: gives information about cmd flags
  • quiz-game.exe --csv file.csv -limit=10 -shuffle=true
  • flag format: -flag=value | --flag value
  • for file names with whitespaces: --csv "file name.csv"

Features:

  • command-line flags
  • timer
  • file handling
  • reading user input
  • go routines & channels

Packages explored:

  • fmt
  • flag: to set command line flags
  • os: to open file from system and to exit app with a status code
  • encoding/csv: to read data from .csv files
  • strings: to format and clean user input
  • time: to set expiry for quiz

Bonus:

  • shuffle flag to randomize quiz
  • rand package: to shuffle the problem set
  • more formatting and cleaning user input

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL