Bladeren bron

Separate type define (#983)

田欧 8 jaren geleden
bovenliggende
commit
34e972e155
2 gewijzigde bestanden met toevoegingen van 28 en 32 verwijderingen
  1. 22 24
      render/html.go
  2. 6 8
      render/json.go

+ 22 - 24
render/html.go

@@ -9,34 +9,32 @@ import (
 	"net/http"
 )
 
-type (
-	Delims struct {
-		Left  string
-		Right string
-	}
+type Delims struct {
+	Left  string
+	Right string
+}
 
-	HTMLRender interface {
-		Instance(string, interface{}) Render
-	}
+type HTMLRender interface {
+	Instance(string, interface{}) Render
+}
 
-	HTMLProduction struct {
-		Template *template.Template
-		Delims   Delims
-	}
+type HTMLProduction struct {
+	Template *template.Template
+	Delims   Delims
+}
 
-	HTMLDebug struct {
-		Files   []string
-		Glob    string
-		Delims  Delims
-		FuncMap template.FuncMap
-	}
+type HTMLDebug struct {
+	Files   []string
+	Glob    string
+	Delims  Delims
+	FuncMap template.FuncMap
+}
 
-	HTML struct {
-		Template *template.Template
-		Name     string
-		Data     interface{}
-	}
-)
+type HTML struct {
+	Template *template.Template
+	Name     string
+	Data     interface{}
+}
 
 var htmlContentType = []string{"text/html; charset=utf-8"}
 

+ 6 - 8
render/json.go

@@ -9,15 +9,13 @@ import (
 	"net/http"
 )
 
-type (
-	JSON struct {
-		Data interface{}
-	}
+type JSON struct {
+	Data interface{}
+}
 
-	IndentedJSON struct {
-		Data interface{}
-	}
-)
+type IndentedJSON struct {
+	Data interface{}
+}
 
 var jsonContentType = []string{"application/json; charset=utf-8"}