normalizeErr removes the prefix -ERR, trim spaces and remove the quotes.
(line string)
| 2995 | |
| 2996 | // normalizeErr removes the prefix -ERR, trim spaces and remove the quotes. |
| 2997 | func normalizeErr(line string) string { |
| 2998 | s := strings.TrimSpace(strings.TrimPrefix(line, _ERR_OP_)) |
| 2999 | s = strings.TrimLeft(strings.TrimRight(s, "'"), "'") |
| 3000 | return s |
| 3001 | } |
| 3002 | |
| 3003 | // natsProtoErr represents an -ERR protocol message sent by the server. |
| 3004 | type natsProtoErr struct { |
no outgoing calls