Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 4740d1ab0c
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (23 sloc) 0.616 kb
package view
import "github.com/ungerik/go-start/utils"
///////////////////////////////////////////////////////////////////////////////
// Label
type Label struct {
ViewBaseWithId
Class string
For View
Content View
}
func (self *Label) Render(context *Context, writer *utils.XMLWriter) (err error) {
var forID string
if self.For != nil {
forID = self.For.ID()
}
writer.OpenTag("label").Attrib("id", self.id).AttribIfNotDefault("class", self.Class)
writer.AttribIfNotDefault("for", forID)
if self.Content != nil {
err = self.Content.Render(context, writer)
}
writer.CloseTag()
return err
}
Jump to Line
Something went wrong with that request. Please try again.