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

Method Process

filter/format_time.go:113–123  ·  view source on GitHub ↗
(l baker.Record, next func(baker.Record))

Source from the content-addressed store, hash-verified

111}
112
113func (f *FormatTime) Process(l baker.Record, next func(baker.Record)) {
114 t, err := f.parse(l.Get(f.src))
115 if err != nil {
116 log.Errorf("can't parse time: %v", err)
117 l.Set(f.dst, nil)
118 } else {
119 l.Set(f.dst, f.format(t))
120 }
121
122 next(l)
123}
124
125func formatToLayout(format string) string {
126 switch format {

Callers 2

TestFormatTimeFunction · 0.95
TestFormatTimeErrorsFunction · 0.95

Calls 2

GetMethod · 0.65
SetMethod · 0.65

Tested by 2

TestFormatTimeFunction · 0.76
TestFormatTimeErrorsFunction · 0.76