Yoginth před 7 roky
rodič
revize
4c09feb65b
1 změnil soubory, kde provedl 8 přidání a 12 odebrání
  1. 8 12
      routes/user/sitemap.go

+ 8 - 12
routes/user/sitemap.go

@@ -12,18 +12,14 @@ type Urlset struct {
 }
 
 func Sitemap(w http.ResponseWriter, r *http.Request) {
+	profile := Urlset{"https://gitote.in/", "Daily", "1.0"}
 
-	for i := 0; i < 0; i++ {
-
-		profile := Urlset{"dfsdf", "dgg", "fsdjfn"}
-
-		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)
+	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)
 }