Rendering the about page from the client side

Here's the definition of the client-side AboutHandler function in the about.go source file found in the client/handlers folder:

func AboutHandler(env *common.Env) isokit.Handler {  return isokit.HandlerFunc(func(ctx context.Context) {    gopherTeamChannel := make(chan []*models.Gopher)    go FetchGopherTeam(gopherTeamChannel)    gophers := <-gopherTeamChannel    templateData := templatedata.About{PageTitle: "About", Gophers: gophers}    env.TemplateSet.Render("about_content", &isokit.RenderParams{Data: templateData, Disposition: isokit.PlacementReplaceInnerContents, Element: env.PrimaryContent, PageTitle: templateData.PageTitle})    InitializeAboutPage(env)  })}

We start out by creating a channel, gopherTeamChannel ...

Get Isomorphic Go now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.