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

Method Process

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

Source from the content-addressed store, hash-verified

44}
45
46func (f *MetadataLastModified) Process(l baker.Record, next func(baker.Record)) {
47 v, ok := l.Meta(inpututils.MetadataLastModified)
48 if ok {
49 lastModified := v.(time.Time)
50 if !lastModified.IsZero() {
51 unixTime := lastModified.Unix()
52 timestampStr := []byte(strconv.FormatInt(unixTime, 10))
53 l.Set(f.dst, timestampStr)
54 }
55 }
56
57 next(l)
58}

Callers 1

TestMetadataLastModifiedFunction · 0.95

Calls 2

MetaMethod · 0.65
SetMethod · 0.65

Tested by 1

TestMetadataLastModifiedFunction · 0.76