Captain ALM
f280becd89
All checks were successful
continuous-integration/drone/push Build is passing
Fix Makefile stuff.
19 lines
605 B
Go
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
|
|
}
|