Slide 11
Slide 11 text
view := Views{
! NewDiv("myclass",
! ! H1("Example HTML structure"),
! ! P("This is a paragraph"),
! ! P(
! ! ! HTML("Some unescaped HTML:
"),
! ! ! Printf("The number of the beast: %d", 666),
! ! ! Escape("Will be escaped: 666 < 999"),
! ! ),
! ! A_blank("http://go-lang.org", "A very simple link"),
! ),
! Hr(),
! Pre("! <- pre formated text, followed by a list:"),
! Ul("red", "green", "blue"),
! &Template{
! ! Filename: "mytemplate.html",
! ! GetContext: func(ctx *Context) (interface{}, os.Error) {
! ! ! return map[string]string{"Key": "Value"}, nil
! ! },
! },
}
Donnerstag, 22. März 12