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

     1  package handlers
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/EngineerKamesh/gofullstack/volume3/section4/gopherface/client/common"
     7  
     8  	"go.isomorphicgo.org/go/isokit"
     9  )
    10  
    11  func MyProfileHandler(env *common.Env) isokit.Handler {
    12  	return isokit.HandlerFunc(func(ctx context.Context) {
    13  		println("Client-side My Profile Handler")
    14  		m := make(map[string]string)
    15  		m["PageTitle"] = "My Profile"
    16  		env.TemplateSet.Render("profile_content", &isokit.RenderParams{Data: m, Disposition: isokit.PlacementReplaceInnerContents, Element: env.PrimaryContent})
    17  	})
    18  }