Explorar o código

Started Implementing User Sitemap

Yoginth %!s(int64=7) %!d(string=hai) anos
pai
achega
ab92863066
Modificáronse 1 ficheiros con 12 adicións e 8 borrados
  1. 12 8
      routes/user/sitemap.go

+ 12 - 8
routes/user/sitemap.go

@@ -12,14 +12,18 @@ type Urlset struct {
 }
 
 func Sitemap(w http.ResponseWriter, r *http.Request) {
-	profile := Urlset{"dfsdf", "dgg", "fsdjfn"}
 
-	x, err := xml.MarshalIndent(profile, "", "  ")
-	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
+	for i := 0; i < 0; i++ {
+
+		profile := Urlset{"dfsdf", "dgg", "fsdjfn"}
 
-	w.Header().Set("Content-Type", "application/xml")
-	w.Write(x)
+		x, err := xml.MarshalIndent(profile, "", "  ")
+		if err != nil {
+			http.Error(w, err.Error(), http.StatusInternalServerError)
+			return
+		}
+
+		w.Header().Set("Content-Type", "application/xml")
+		w.Write(x)
+	}
 }