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

Function validateForStmt

parser/parser.go:858–862  ·  view source on GitHub ↗
(stmt []byte)

Source from the content-addressed store, hash-verified

856}
857
858func validateForStmt(stmt []byte) error {
859 exprStr := fmt.Sprintf("func () { for %s {} }", stmt)
860 _, err := goparser.ParseExpr(exprStr)
861 return err
862}
863
864func validateIfStmt(stmt []byte) error {
865 exprStr := fmt.Sprintf("func () { if %s {} }", stmt)

Callers 1

parseForMethod · 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…