sync: Prefer challenge.toml over challenge.txt
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b5065df4c3
commit
651d428223
7 changed files with 16 additions and 16 deletions
|
@ -106,9 +106,9 @@ func NewChallengeTxtError(exercice *fic.Exercice, line uint, err error, theme ..
|
|||
|
||||
func (e *ChallengeTxtError) Error() string {
|
||||
if e.ChallengeTxtLine != 0 {
|
||||
return fmt.Sprintf("%s:%d: %s", path.Join(e.ExercicePath, "challenge.txt"), e.ChallengeTxtLine, e.ThemeError.error.Error())
|
||||
return fmt.Sprintf("%s:%d: %s", path.Join(e.ExercicePath, "challenge.toml"), e.ChallengeTxtLine, e.ThemeError.error.Error())
|
||||
} else {
|
||||
return fmt.Sprintf("%s: %s", path.Join(e.ExercicePath, "challenge.txt"), e.ThemeError.error.Error())
|
||||
return fmt.Sprintf("%s: %s", path.Join(e.ExercicePath, "challenge.toml"), e.ThemeError.error.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ func NewHintError(exercice *fic.Exercice, hint *fic.EHint, line int, err error,
|
|||
}
|
||||
|
||||
func (e *HintError) Error() string {
|
||||
return fmt.Sprintf("%s: hint#%d (%s): %s", path.Join(e.ExercicePath, "challenge.txt"), e.HintId, e.HintTitle, e.ThemeError.error.Error())
|
||||
return fmt.Sprintf("%s: hint#%d (%s): %s", path.Join(e.ExercicePath, "challenge.toml"), e.HintId, e.HintTitle, e.ThemeError.error.Error())
|
||||
}
|
||||
|
||||
type FlagError struct {
|
||||
|
@ -144,5 +144,5 @@ func NewFlagError(exercice *fic.Exercice, flag *ExerciceFlag, line int, err erro
|
|||
}
|
||||
|
||||
func (e *FlagError) Error() string {
|
||||
return fmt.Sprintf("%s: flag#%d: %s", path.Join(e.ExercicePath, "challenge.txt"), e.FlagId, e.ThemeError.error.Error())
|
||||
return fmt.Sprintf("%s: flag#%d: %s", path.Join(e.ExercicePath, "challenge.toml"), e.FlagId, e.ThemeError.error.Error())
|
||||
}
|
||||
|
|
Reference in a new issue