github.com/kotovmak/go-admin@v1.1.1/template/components/row.go (about) 1 package components 2 3 import ( 4 "html/template" 5 6 "github.com/kotovmak/go-admin/template/types" 7 ) 8 9 type RowAttribute struct { 10 Name string 11 Content template.HTML 12 types.Attribute 13 } 14 15 func (compo *RowAttribute) SetContent(value template.HTML) types.RowAttribute { 16 compo.Content = value 17 return compo 18 } 19 20 func (compo *RowAttribute) AddContent(value template.HTML) types.RowAttribute { 21 compo.Content += value 22 return compo 23 } 24 25 func (compo *RowAttribute) GetContent() template.HTML { 26 return ComposeHtml(compo.TemplateList, compo.Separation, *compo, "row") 27 }