ArgErr returns an argument error, meaning that another argument was expected but not found. In other words, a line break or open curly brace was encountered instead of an argument.
()
| 406 | // a line break or open curly brace was encountered instead of |
| 407 | // an argument. |
| 408 | func (d *Dispenser) ArgErr() error { |
| 409 | if d.Val() == "{" { |
| 410 | return d.Err("unexpected token '{', expecting argument") |
| 411 | } |
| 412 | return d.Errf("wrong argument count or unexpected line ending after '%s'", d.Val()) |
| 413 | } |
| 414 | |
| 415 | // SyntaxErr creates a generic syntax error which explains what was |
| 416 | // found and what was expected. |