Simple form: " : " Use LastIndex to avoid splitting colons within line:col info. Matches https://cs.opensource.google/go/go/+/refs/tags/go1.23.6:src/text/template/exec.go;l=138
(remainder string)
| 396 | // Use LastIndex to avoid splitting colons within line:col info. |
| 397 | // Matches https://cs.opensource.google/go/go/+/refs/tags/go1.23.6:src/text/template/exec.go;l=138 |
| 398 | func parseTemplateSimpleErrorString(remainder string) (TraceableError, bool) { |
| 399 | if sep := strings.LastIndex(remainder, ": "); sep != -1 { |
| 400 | templateName := remainder[:sep] |
| 401 | errMsg := remainder[sep+2:] |
| 402 | if cut := strings.Index(errMsg, " template:"); cut != -1 { |
| 403 | errMsg = errMsg[:cut] |
| 404 | } |
| 405 | return TraceableError{location: templateName, message: errMsg}, true |
| 406 | } |
| 407 | return TraceableError{}, false |
| 408 | } |
| 409 | |
| 410 | // Executing form: "<templateName>: executing \"<funcName>\" at <<location>>: <errMsg>[ template:...]" |
| 411 | // Matches https://cs.opensource.google/go/go/+/refs/tags/go1.23.6:src/text/template/exec.go;l=141 |
searching dependent graphs…