|
@@ -12,18 +12,14 @@ type Urlset struct {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func Sitemap(w http.ResponseWriter, r *http.Request) {
|
|
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)
|
|
|
}
|
|
}
|