MCPcopy
hub / github.com/valyala/quicktemplate / validateFuncCode

Function validateFuncCode

parser/parser.go:882–886  ·  view source on GitHub ↗
(code []byte)

Source from the content-addressed store, hash-verified

880}
881
882func validateFuncCode(code []byte) error {
883 exprStr := fmt.Sprintf("func () { for { %s\n } }", code)
884 _, err := goparser.ParseExpr(exprStr)
885 return err
886}
887
888func validateTemplateCode(code []byte) error {
889 codeStr := fmt.Sprintf("package foo\nvar _ = a\n%s", code)

Callers 1

parseFuncCodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…