@@ -38,29 +38,29 @@ func TestTemplateDescriptorCompare(t *testing.T) {
3838 check (
3939
4040 CategoryBaseof ,
41- TemplateDescriptor {Kind : "" , Layout : "" , Lang : "" , OutputFormat : "404" , MediaType : "text/html" },
42- TemplateDescriptor {Kind : "" , Layout : "" , Lang : "" , OutputFormat : "html" , MediaType : "text/html" },
41+ TemplateDescriptor {Kind : "" , LayoutFromTemplate : "" , Lang : "" , OutputFormat : "404" , MediaType : "text/html" },
42+ TemplateDescriptor {Kind : "" , LayoutFromTemplate : "" , Lang : "" , OutputFormat : "html" , MediaType : "text/html" },
4343 false ,
4444 )
4545
4646 check (
4747 CategoryLayout ,
4848 TemplateDescriptor {Kind : "" , Lang : "en" , OutputFormat : "404" , MediaType : "text/html" },
49- TemplateDescriptor {Kind : "" , Layout : "" , Lang : "" , OutputFormat : "alias" , MediaType : "text/html" },
49+ TemplateDescriptor {Kind : "" , LayoutFromTemplate : "" , Lang : "" , OutputFormat : "alias" , MediaType : "text/html" },
5050 true ,
5151 )
5252
5353 less (
5454 CategoryLayout ,
55- TemplateDescriptor {Kind : kinds .KindHome , Layout : "list" , OutputFormat : "html" },
56- TemplateDescriptor {Layout : "list" , OutputFormat : "html" },
55+ TemplateDescriptor {Kind : kinds .KindHome , LayoutFromTemplate : "list" , OutputFormat : "html" },
56+ TemplateDescriptor {LayoutFromTemplate : "list" , OutputFormat : "html" },
5757 TemplateDescriptor {Kind : kinds .KindHome , OutputFormat : "html" },
5858 )
5959
6060 check (
6161 CategoryLayout ,
62- TemplateDescriptor {Kind : kinds .KindHome , Layout : "list" , OutputFormat : "html" , MediaType : "text/html" },
63- TemplateDescriptor {Kind : kinds .KindHome , Layout : "list" , OutputFormat : "myformat" , MediaType : "text/html" },
62+ TemplateDescriptor {Kind : kinds .KindHome , LayoutFromTemplate : "list" , OutputFormat : "html" , MediaType : "text/html" },
63+ TemplateDescriptor {Kind : kinds .KindHome , LayoutFromTemplate : "list" , OutputFormat : "myformat" , MediaType : "text/html" },
6464 false ,
6565 )
6666}
@@ -78,20 +78,20 @@ func BenchmarkCompareDescriptors(b *testing.B) {
7878 d1 , d2 TemplateDescriptor
7979 }{
8080 {
81- TemplateDescriptor {Kind : "" , Layout : "" , OutputFormat : "404" , MediaType : "text/html" , Lang : "en" , Variant1 : "" , Variant2 : "" , LayoutMustMatch : false , IsPlainText : false },
82- TemplateDescriptor {Kind : "" , Layout : "" , OutputFormat : "rss" , MediaType : "application/rss+xml" , Lang : "" , Variant1 : "" , Variant2 : "" , LayoutMustMatch : false , IsPlainText : false },
81+ TemplateDescriptor {Kind : "" , LayoutFromTemplate : "" , OutputFormat : "404" , MediaType : "text/html" , Lang : "en" , Variant1 : "" , Variant2 : "" , LayoutCustomMustMatch : false , IsPlainText : false },
82+ TemplateDescriptor {Kind : "" , LayoutFromTemplate : "" , OutputFormat : "rss" , MediaType : "application/rss+xml" , Lang : "" , Variant1 : "" , Variant2 : "" , LayoutCustomMustMatch : false , IsPlainText : false },
8383 },
8484 {
85- TemplateDescriptor {Kind : "page" , Layout : "single" , OutputFormat : "html" , MediaType : "text/html" , Lang : "en" , Variant1 : "" , Variant2 : "" , LayoutMustMatch : false , IsPlainText : false },
86- TemplateDescriptor {Kind : "" , Layout : "list" , OutputFormat : "" , MediaType : "application/rss+xml" , Lang : "" , Variant1 : "" , Variant2 : "" , LayoutMustMatch : false , IsPlainText : false },
85+ TemplateDescriptor {Kind : "page" , LayoutFromTemplate : "single" , OutputFormat : "html" , MediaType : "text/html" , Lang : "en" , Variant1 : "" , Variant2 : "" , LayoutCustomMustMatch : false , IsPlainText : false },
86+ TemplateDescriptor {Kind : "" , LayoutFromTemplate : "list" , OutputFormat : "" , MediaType : "application/rss+xml" , Lang : "" , Variant1 : "" , Variant2 : "" , LayoutCustomMustMatch : false , IsPlainText : false },
8787 },
8888 {
89- TemplateDescriptor {Kind : "page" , Layout : "single" , OutputFormat : "html" , MediaType : "text/html" , Lang : "en" , Variant1 : "" , Variant2 : "" , LayoutMustMatch : false , IsPlainText : false },
90- TemplateDescriptor {Kind : "" , Layout : "" , OutputFormat : "alias" , MediaType : "text/html" , Lang : "" , Variant1 : "" , Variant2 : "" , LayoutMustMatch : false , IsPlainText : false },
89+ TemplateDescriptor {Kind : "page" , LayoutFromTemplate : "single" , OutputFormat : "html" , MediaType : "text/html" , Lang : "en" , Variant1 : "" , Variant2 : "" , LayoutCustomMustMatch : false , IsPlainText : false },
90+ TemplateDescriptor {Kind : "" , LayoutFromTemplate : "" , OutputFormat : "alias" , MediaType : "text/html" , Lang : "" , Variant1 : "" , Variant2 : "" , LayoutCustomMustMatch : false , IsPlainText : false },
9191 },
9292 {
93- TemplateDescriptor {Kind : "page" , Layout : "single" , OutputFormat : "rss" , MediaType : "application/rss+xml" , Lang : "en" , Variant1 : "" , Variant2 : "" , LayoutMustMatch : false , IsPlainText : false },
94- TemplateDescriptor {Kind : "" , Layout : "single" , OutputFormat : "rss" , MediaType : "application/rss+xml" , Lang : "nn" , Variant1 : "" , Variant2 : "" , LayoutMustMatch : false , IsPlainText : false },
93+ TemplateDescriptor {Kind : "page" , LayoutFromTemplate : "single" , OutputFormat : "rss" , MediaType : "application/rss+xml" , Lang : "en" , Variant1 : "" , Variant2 : "" , LayoutCustomMustMatch : false , IsPlainText : false },
94+ TemplateDescriptor {Kind : "" , LayoutFromTemplate : "single" , OutputFormat : "rss" , MediaType : "application/rss+xml" , Lang : "nn" , Variant1 : "" , Variant2 : "" , LayoutCustomMustMatch : false , IsPlainText : false },
9595 },
9696 }
9797
0 commit comments