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

Function validateIfStmt

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

Source from the content-addressed store, hash-verified

862}
863
864func validateIfStmt(stmt []byte) error {
865 exprStr := fmt.Sprintf("func () { if %s {} }", stmt)
866 _, err := goparser.ParseExpr(exprStr)
867 return err
868}
869
870func validateSwitchStmt(stmt []byte) error {
871 exprStr := fmt.Sprintf("func () { switch %s {} }", stmt)

Callers 1

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