Documentation
¶
Overview ¶
Package config contains the structure of the gotools config file, along with helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultVersion ¶
Return the default go.mod version from a config.
Types ¶
type Config ¶
type Config struct {
GoModVersion VersionConfig `json:"go_mod_version"`
TestFiles TestFileConfig `json:"test_files"`
}
type ExerciseVersion ¶
ExerciseVersion represents the version one particular exercise should have in its go.mod file
type TestFileConfig ¶
type VersionConfig ¶
type VersionConfig struct {
// Default version for the go.mod files
Default string `json:"default"`
// List of exercises and their versions that must not have
// the default version.
Exceptions []ExerciseVersion `json:"exceptions"`
}
VersionConfig represents the version configuration
func (*VersionConfig) ExerciseExpectedVersion ¶
func (vc *VersionConfig) ExerciseExpectedVersion(exercise string) string
ExerciseExpectedVersion gives the expected version the go.mod file for an exercise should be at. The argument should be the slug of an exercise.
Click to show internal directories.
Click to hide internal directories.