Improved variable definitions

This commit is contained in:
Eduard Urbach 2024-06-22 20:18:13 +02:00
parent 0b4b10ed4c
commit 57c9fc22d1
Signed by: eduard
GPG key ID: 49226B848C78F6C8
7 changed files with 48 additions and 22 deletions

View file

@ -11,8 +11,8 @@ type UnknownIdentifier struct {
// Error generates the string representation.
func (err *UnknownIdentifier) Error() string {
if err.CorrectName != "" {
return fmt.Sprintf("Unknown variable '%s', did you mean '%s'?", err.Name, err.CorrectName)
return fmt.Sprintf("Unknown identifier '%s', did you mean '%s'?", err.Name, err.CorrectName)
}
return fmt.Sprintf("Unknown variable '%s'", err.Name)
return fmt.Sprintf("Unknown identifier '%s'", err.Name)
}