()
| 7 | } |
| 8 | |
| 9 | func (m *SyntaxError) Error() string { |
| 10 | var expectingText string |
| 11 | |
| 12 | if len(m.expecting) == 1 { |
| 13 | expectingText = m.expecting[0] |
| 14 | } else { |
| 15 | for i, expected := range m.expecting { |
| 16 | expectingText += expected |
| 17 | if i != len(m.expecting)-1 { |
| 18 | expectingText += ", " |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | return "syntax error, expecting: {" + expectingText + "}, got: {" + m.got + "}" |
| 24 | } |
| 25 | |
| 26 | // SyntaxCommandExpectedError - error thrown when there was command that logically should only |
| 27 | // appear after certain different command, but it wasn't found |
no outgoing calls