Documentation ¶
Overview ¶
Package exercise contains helper functions for:
- multiple choice exercises answered in markdown files.
- command line exercises for a set of commands that should return a specific output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandLine ¶
CommandLine computes the score for a set of command line exercises that students provided. The function requires the list of commands and their expected answers, and a Score object. The function will produce both string output and JSON output.
func MultipleChoice ¶
MultipleChoice computes the score of a multiple choice exercise with student answers provided in fileName, and the answers provided in the answerKey object. The function requires a Score object, and will produce both string output and JSON output.
Types ¶
type Commands ¶
type Commands []struct { Command string Result string Search SearchType }
type SearchType ¶
type SearchType int
const ( ResultEquals SearchType = iota ResultContains ResultDoesNotContain )
Click to show internal directories.
Click to hide internal directories.