package main

import (
	"golang.source-fellows.com/pattern/observer/internal"
	"golang.source-fellows.com/pattern/observer/internal/html"
	"golang.source-fellows.com/pattern/observer/internal/model"
	"golang.source-fellows.com/pattern/observer/internal/pdf"
)

func main() {

	newTraining := model.NewCommoditiesNews("GO")
	manager := &internal.CommoditiesNewsManager{}

	pdfGenerator := pdf.NewGenerator(manager)
	htmlGenerator := html.NewGenerator(manager)

	manager.Attach(pdfGenerator)
	manager.Attach(htmlGenerator)

	manager.CreateCommoditiesNews(newTraining)

}
