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

Method evaluateURLs

filter/external_match.go:97–109  ·  view source on GitHub ↗

evaluateURLs evaluates urls using the current configuration..

()

Source from the content-addressed store, hash-verified

95
96// evaluateURLs evaluates urls using the current configuration..
97func (cfg *ExternalMatchConfig) evaluateURLs() []string {
98 var args []interface{}
99 if cfg.DateTimeLayout != "" {
100 now := time.Now().Add(-time.Duration(cfg.TimeSubtract))
101 args = append(args, now.Format(cfg.DateTimeLayout))
102 }
103
104 ret := make([]string, 0, len(cfg.Files))
105 for _, u := range cfg.Files {
106 ret = append(ret, fmt.Sprintf(u, args...))
107 }
108 return ret
109}
110
111func NewExternalMatch(cfg baker.FilterParams) (baker.Filter, error) {
112 dcfg := cfg.DecodedConfig.(*ExternalMatchConfig)

Callers 3

fillDefaultsMethod · 0.95
updateValuesMethod · 0.80

Calls 1

DurationMethod · 0.65

Tested by 1