Write docs!
This commit is contained in:
parent
c460bb7bf5
commit
bcc598ebd5
37 changed files with 478 additions and 188 deletions
|
|
@ -6,17 +6,20 @@ import (
|
|||
"github.com/BurntSushi/toml"
|
||||
)
|
||||
|
||||
// ExerciceHintParams holds EHint definition infomation.
|
||||
type ExerciceHintParams struct {
|
||||
Filename string
|
||||
Cost int64
|
||||
Title string
|
||||
}
|
||||
|
||||
// ExerciceParams contains values parsed from defines.txt.
|
||||
type ExerciceParams struct {
|
||||
Gain int64
|
||||
Hints []ExerciceHintParams `toml:"hint"`
|
||||
}
|
||||
|
||||
// parseExerciceParams reads challenge definitions from defines.txt and extract usefull data to set up the challenge.
|
||||
func parseExerciceParams(i Importer, exPath string) (p ExerciceParams, err error) {
|
||||
var defs string
|
||||
defs, err = getFileContent(i, path.Join(exPath, "defines.txt"))
|
||||
|
|
|
|||
Reference in a new issue