From 90dc93fc52b406fb26c97dc2610150de63a96ed1 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 13 Aug 2017 14:41:07 +1200 Subject: [PATCH] implement LogSource.EarliestDate() --- Config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Config.go b/Config.go index a36901b..971ca51 100644 --- a/Config.go +++ b/Config.go @@ -26,6 +26,11 @@ type LogSource struct { FileLocation []LogLocation } +func (this *LogSource) EarliestDate() YearMonth { + // assume it's the first in the list (although it might not be) + return this.FileLocation[0].StartMonth +} + func (this *LogSource) LatestDate() YearMonth { // assume it's the last in the list (although it might not be) end := this.FileLocation[len(this.FileLocation)-1].EndMonth