MCPcopy
hub / github.com/yusing/godoxy / ExpandVars

Method ExpandVars

internal/route/rules/template.go:26–33  ·  view source on GitHub ↗
(w *httputils.ResponseModifier, req *http.Request, dst io.Writer)

Source from the content-addressed store, hash-verified

24}
25
26func (tmpl *templateString) ExpandVars(w *httputils.ResponseModifier, req *http.Request, dst io.Writer) (phase PhaseFlag, err error) {
27 if !tmpl.isTemplate {
28 _, err := asBytesBufferLike(dst).WriteString(tmpl.string)
29 return PhaseNone, err
30 }
31
32 return ExpandVars(w, req, tmpl.string, dst)
33}
34
35func (tmpl *templateString) ExpandVarsToString(w *httputils.ResponseModifier, r *http.Request) (string, PhaseFlag, error) {
36 if !tmpl.isTemplate {

Callers 3

ExpandVarsToStringMethod · 0.95
do.goFile · 0.80
do_set.goFile · 0.80

Calls 3

asBytesBufferLikeFunction · 0.85
ExpandVarsFunction · 0.85
WriteStringMethod · 0.65

Tested by

no test coverage detected