Term Quiz

Build Status Go Report Card GoDoc Coverage Status

A Quiz application made for your terminal

Image of a abcd question

Image of end screen solution

go get
Question Types Include
  • A B C D
  • True and False
  • Fill in the Blank

See the code examples and test csv files.

Quiz Screen
Keybindings Action
Ctrl + C Quit
Tab Next Answer
Enter Select Answer
Solutions Screen
Keybinding Action
Ctrl + C Quit
Enter Next Solution

Feel free to report any bugs or make suggestions here.

Repository of Quizzes

Feel free to add or use quizzes in the following repository (




This section is empty.


View Source
var (
	//Questions -- Global container for questions
	Questions = questions.NewQuestions()
	//UserAnswers -- Global container for UserAnswers
	UserAnswers = user.Answers{}
	//QuestionLimit -- Limits the number of questions that are shown to the user
	QuestionLimit = 10
	//CurrentUserAnswer -- index for user answers
	CurrentUserAnswer = 1
View Source
var (
	//AnswersToBoxViews -- used to map the user selected box view to the actual answer
	AnswersToBoxViews = map[string]*answers.Answer{}


func ABCDInit

func ABCDInit(g *gocui.Gui, q *questions.Question, count string) (err error)

    ABCDInit -- Initializes the ABCD gui interface

    func ESInit

    func ESInit(g *gocui.Gui, u user.Answers) (err error)

      ESInit -- End Screen Initialization. Presents the results

      func FBInit

      func FBInit(g *gocui.Gui, q *questions.Question, count string) (err error)

        FBInit -- Initializes the Fill in the Blank gui interface

        func FileArgs

        func FileArgs(files []string) (err error)

          FileArgs -- Checks the file args passed into the program

          func FillInAnswer

          func FillInAnswer(g *gocui.Gui, v *gocui.View) error

            FillInAnswer -- Callback used for the fill in the blank answers

            func Init

            func Init(g *gocui.Gui) (err error)

              Init -- The Init function decides which sub Init function should be called ABCDInint, TFInit or FBInit

              func NextUserAnswer

              func NextUserAnswer(g *gocui.Gui, v *gocui.View) error

                NextUserAnswer -- View next user answer

                func SelectAnswer

                func SelectAnswer(g *gocui.Gui, v *gocui.View) error

                  SelectAnswer -- Callback used to select an answer in quiz layouts that have multiple answers to select from

                  func TFInit

                  func TFInit(g *gocui.Gui, q *questions.Question, count string) (err error)

                    TFInit -- Initializes the True and False gui interface


                    This section is empty.


                    Path Synopsis