MCPcopy Create free account
hub / github.com/AdRoll/baker / Process

Method Process

filter/url_param.go:58–69  ·  view source on GitHub ↗
(l baker.Record, next func(baker.Record))

Source from the content-addressed store, hash-verified

56}
57
58func (f *URLParam) Process(l baker.Record, next func(baker.Record)) {
59 param := ""
60
61 u, err := url.Parse(string(l.Get(f.srcField)))
62 if err == nil {
63 param = u.Query().Get(f.param)
64 }
65
66 l.Set(f.dstField, []byte(param))
67
68 next(l)
69}
70
71func (c *URLParam) Stats() baker.FilterStats {
72 return baker.FilterStats{}

Callers 1

TestURLParamFunction · 0.95

Calls 3

ParseMethod · 0.65
GetMethod · 0.65
SetMethod · 0.65

Tested by 1

TestURLParamFunction · 0.76