Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapitalQuiz ¶
type CapitalQuiz struct { Country string `json:"country"` // The name of the country Flag string `json:"flag"` // Link to the image of the country's flag Variants []string `json:"variants"` // Answer options Answer string `json:"answer"` // Correct answer }
Data for the capital quiz
func GetCapitalQuiz ¶
func GetCapitalQuiz(variants, amount int) ([]CapitalQuiz, error)
Get a quiz in which you have to guess the capital of the specified country
type CountryData ¶
type CountryData struct { Code string `json:"code"` // ISO 3166-1 alpha-2 code of the country Country string `json:"country"` // The name of the country Capital string `json:"capital"` // The name of the capital of the country }
Country data from the database
type CountryQuiz ¶
type CountryQuiz struct { Flag string `json:"flag"` // Link to the image of the country's flag Variants []string `json:"variants"` // Answer options Answer string `json:"answer"` // Correct answer }
Data for the country quiz
func GetCountryQuiz ¶
func GetCountryQuiz(variants, amount int) ([]CountryQuiz, error)
Get a quiz in which you have to guess the name of the country from the image of its flag
Click to show internal directories.
Click to hide internal directories.