O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The contact confirmation route handler

The sole purpose of the ContactConfirmationHandler function is to render the contact confirmation page:

func ContactConfirmationHandler(env *common.Env) http.Handler {  return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {    env.TemplateSet.Render("contact_confirmation_page", &isokit.RenderParams{Writer: w, Data: nil})  })}

We call the Render method of the TemplateSet object and specify that want to render the contact_confirmation_page template, along with the passed in RenderParams struct. We have populated the Writer field of the struct with the http.ResponseWriter, and we have assigned a value of nil to the Data object, to indicate that there is no data object that is to be passed to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required