diff options
| author | siddharth <s@ricketyspace.net> | 2021-11-28 20:35:35 -0500 | 
|---|---|---|
| committer | siddharth <s@ricketyspace.net> | 2021-11-28 20:35:35 -0500 | 
| commit | feec7ac56e77fc3cc90e2f2b87032a3198004a83 (patch) | |
| tree | 6e7a5765d3c04a7609d8e166695dd1a98005a892 /feed/feed.go | |
| parent | ec9ff40e2e9d8b5bd89dc6017539d6500aaf3e4a (diff) | |
feed: add Feed.Last
Diffstat (limited to 'feed/feed.go')
| -rw-r--r-- | feed/feed.go | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/feed/feed.go b/feed/feed.go index e97921c..8d3609c 100644 --- a/feed/feed.go +++ b/feed/feed.go @@ -19,6 +19,7 @@ type Feed struct {  	Id      string `json:"id"`  	Source  string `json:"source"`  	Schema  string `json:"schema"` +	Last    uint `json:"last"`  	YDLPath string  	DumpDir string  	Entries []schema.Entry @@ -56,6 +57,11 @@ func (feed *Feed) Validate(ydlPath, baseDumpDir string) error {  			feed.Schema, feed.Id)  	} +	// Check 'last' +	if feed.Last < 1 { +		return fmt.Errorf("'last' not set or 0 in a feed '%s'", feed.Id) +	} +  	// Set ydl-path for feed.  	feed.YDLPath = ydlPath | 
