answers

package
v0.0.0-...-e141d51 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	Answer  string
	Correct bool
}

Answer -- interface for a valid answer

type Answers

type Answers struct {
	Answers []*Answer
}

Answers -- interface for a slice of answers

func (Answers) CorrectAnswer

func (as Answers) CorrectAnswer() (*Answer, error)

CorrectAnswer -- Returns the correct answer. Note: there should only be one correct answer

func (Answers) Shuffle

func (as Answers) Shuffle() error

Shuffle -- In place shuffle of the answers

Jump to

Keyboard shortcuts

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