cityuni-webserver/pageHandler/pages.go
Captain ALM f280becd89
All checks were successful
continuous-integration/drone/push Build is passing
Add initial index page code.
Fix Makefile stuff.
2022-07-16 22:20:56 +01:00

19 lines
605 B
Go

package pageHandler
import "golang.captainalm.com/cityuni-webserver/pageHandler/pages/index"
var providers map[string]PageProvider
func GetProviders(cacheTemplates bool, dataStorage string, pageHandler *PageHandler) map[string]PageProvider {
if providers == nil {
providers = make(map[string]PageProvider)
if pageHandler != nil {
infoPage := newGoInfoPage(pageHandler, dataStorage, cacheTemplates)
providers[infoPage.GetPath()] = infoPage //Go Information Page
}
indexPage := index.NewPage(dataStorage, cacheTemplates)
providers[indexPage.GetPath()] = indexPage
}
return providers
}