func (ctx *HttpContext) RenderWithLayout(viewName, layout string, viewModel interface{}) *ViewResult {
    return ctx.rederView(viewName, layout, viewModel, false)
}
RenderWithLayout renders the view and return a *ViewResult
it will find the view in these rules:
1. /{ViewPath}/{Controller}/{viewName}
2. /{ViewPath}/shared/{viewName}
package goku
import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "path"
)
type HttpContext struct {
    Request        *http.Request        
    responseWriter http.ResponseWriter  
    Method         string               
    RouteData *RouteData              
    ViewData  map[string]interface{}  
    Data      map[string]interface{}  
    Result    ActionResulter          
    Err       error                   
    User      string                  
    Canceled  bool                    
    requestHandler       *RequestHandler
    responseContentCache *bytes.Buffer  
    responseStatusCode   int            
}
func (ctx *HttpContext) flushToResponse() {
    if ctx.responseStatusCode > 0 {
        ctx.responseWriter.WriteHeader(ctx.responseStatusCode)
    }
    if ctx.responseContentCache.Len() > 0 {
        ctx.responseContentCache.WriteTo(ctx.responseWriter)
    }
}
func (ctx *HttpContext) ResponseWriter() http.ResponseWriter {
    return ctx.responseWriter
}
func (ctx *HttpContext) RootDir() string {
    return ctx.requestHandler.ServerConfig.RootDir
}
func (ctx *HttpContext) StaticPath() string {
    return path.Join(ctx.RootDir(), ctx.requestHandler.ServerConfig.StaticPath)
}
func (ctx *HttpContext) ViewPath() string {
    return path.Join(ctx.RootDir(), ctx.requestHandler.ServerConfig.ViewPath)
}
func (ctx *HttpContext) Get(name string) string {
    v, ok := ctx.RouteData.Get(name)
    if ok {
        return v
    }
    return ctx.Request.FormValue(name)
}
func (ctx *HttpContext) Header() http.Header {
    return ctx.responseWriter.Header()
}
func (ctx *HttpContext) SetHeader(key string, value string) {
    ctx.responseWriter.Header().Set(key, value)
}
func (ctx *HttpContext) AddHeader(key string, value string) {
    ctx.responseWriter.Header().Add(key, value)
}
func (ctx *HttpContext) SetCookie(cookie *http.Cookie) {
    ctx.responseWriter.Header().Add("Set-Cookie", cookie.String())
}
func (ctx *HttpContext) GetHeader(key string) string {
    return ctx.Request.Header.Get(key)
}
func (ctx *HttpContext) ContentType(ctype string) {
    ctx.responseWriter.Header().Set("Content-Type", ctype)
}
func (ctx *HttpContext) Status(code int) {
    ctx.responseStatusCode = code
}
func (ctx *HttpContext) Write(b []byte) (int, error) {
    return ctx.responseContentCache.Write(b)
}
func (ctx *HttpContext) WriteBuffer(bf *bytes.Buffer) {
    bf.WriteTo(ctx.responseContentCache)
}
func (ctx *HttpContext) WriteString(content string) {
    ctx.responseContentCache.Write([]byte(content))
}
func (ctx *HttpContext) WriteHeader(code int) {
    ctx.responseStatusCode = code
}
func (ctx *HttpContext) IsAjax() bool {
    return ctx.GetHeader("X-Requested-With") == "XMLHttpRequest"
}
func (ctx *HttpContext) Render(viewName string, viewModel interface{}) *ViewResult {
    return ctx.rederView(viewName, "", viewModel, false)
}