package useflags import "net/http" import "soko/pkg/database" import "soko/pkg/models" import "github.com/go-pg/pg/v10" templ expand(useflags []models.Useflag) {
for i, use := range useflags { if i == 0 || use.UseExpand != useflags[i-1].UseExpand { @templ.Raw("
")

0) } id={ use.UseExpand }>{ use.UseExpand }

@templ.Raw(`
for i, use := range useflags { if i == 0 || use.UseExpand != useflags[i-1].UseExpand { { use.UseExpand }
} }
} func Expand(w http.ResponseWriter, r *http.Request) { var useflags []models.Useflag err := database.DBCon.Model(&useflags). Where("scope = 'use_expand'"). Order("use_expand", "name"). Column("use_expand", "name", "description"). Select() if err != nil && err != pg.ErrNoRows { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) return } RenderPage(w, r, "USE Expand", "USE Expand", expand(useflags)) }