github.com/EngineerKamesh/gofullstack@v0.0.0-20180609171605-d41341d7d4ee/volume3/section4/gopherface/handlers/myprofile.go (about)

     1  package handlers
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"go.isomorphicgo.org/go/isokit"
     7  
     8  	"github.com/EngineerKamesh/gofullstack/volume3/section4/gopherface/common"
     9  )
    10  
    11  func MyProfileHandler(env *common.Env) http.HandlerFunc {
    12  	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    13  
    14  		m := make(map[string]string)
    15  		m["PageTitle"] = "My Profile"
    16  		env.TemplateSet.Render("profile_page", &isokit.RenderParams{Writer: w, Data: m})
    17  	})
    18  }