MCPcopy Index your code
hub / github.com/helm/helm / parseTemplateSimpleErrorString

Function parseTemplateSimpleErrorString

pkg/engine/engine.go:398–408  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
398func 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

Callers 2

Calls 1

IndexMethod · 0.80

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…