Преглед на файлове

Started Implementing User Sitemap

Yoginth преди 7 години
родител
ревизия
ab92863066
променени са 1 файла, в които са добавени 12 реда и са изтрити 8 реда
  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)
+	}
 }