Write docs!

This commit is contained in:
nemunaire 2018-03-09 19:07:08 +01:00
commit bcc598ebd5
37 changed files with 478 additions and 188 deletions

View file

@ -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"))