This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
srv/controller/controller.go
Dave Gallant 49ea48976d Re-structure packages
Overhaul of package structure and other cleanup.
2020-04-04 20:19:46 -04:00

23 lines
456 B
Go

package controller
import (
"time"
config "github.com/davegallant/srv/config"
feeds "github.com/davegallant/srv/feeds"
)
// Controller keeps everything together
type Controller struct {
Config config.Configuration
lastUpdate time.Time
Rss *feeds.RSS
}
// Init initiates the controller with config
func (c *Controller) Init(conf string) {
c.Config = config.LoadConfiguration(conf)
c.Rss = &feeds.RSS{}
c.Rss.Update(c.Config.Feeds)
}