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

Method parseFuncCode

parser/parser.go:696–706  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

694}
695
696func (p *parser) parseFuncCode() error {
697 t, err := expectTagContents(p.s)
698 if err != nil {
699 return err
700 }
701 if err = validateFuncCode(t.Value); err != nil {
702 return fmt.Errorf("invalid code at %s: %s", p.s.Context(), err)
703 }
704 p.Printf("%s\n", t.Value)
705 return nil
706}
707
708func (p *parser) parseOutputTag(tagNameStr string, prec int) error {
709 s := p.s

Callers 1

tryParseCommonTagsMethod · 0.95

Calls 4

PrintfMethod · 0.95
expectTagContentsFunction · 0.85
validateFuncCodeFunction · 0.85
ContextMethod · 0.80

Tested by

no test coverage detected