MCPcopy Create free account
hub / github.com/devfeel/dotweb / AddView

Method AddView

context.go:536–545  ·  view source on GitHub ↗

AddView add need parse views before View()

(names ...string)

Source from the content-addressed store, hash-verified

534
535// AddView add need parse views before View()
536func (ctx *HttpContext) AddView(names ...string) []string {
537 var views []string
538 item, exists := ctx.getInnerItems().Get(innerKeyAddView)
539 if exists {
540 views = item.([]string)
541 }
542 views = append(views, names...)
543 ctx.getInnerItems().Set(innerKeyAddView, views)
544 return views
545}
546
547// View write view content to response
548func (ctx *HttpContext) View(name string) error {

Callers 1

ViewCMethod · 0.95

Calls 3

getInnerItemsMethod · 0.95
GetMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected