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

Function validateSwitchStmt

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

Source from the content-addressed store, hash-verified

868}
869
870func validateSwitchStmt(stmt []byte) error {
871 exprStr := fmt.Sprintf("func () { switch %s {} }", stmt)
872 _, err := goparser.ParseExpr(exprStr)
873 return err
874}
875
876func validateCaseStmt(switchValue string, stmt []byte) error {
877 exprStr := fmt.Sprintf("func () { switch %s {case %s:} }", switchValue, stmt)

Callers 1

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