Browse Source

Added Sitemap

Yoginth 7 years ago
parent
commit
4c09feb65b
1 changed files with 8 additions and 12 deletions
  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)
 }