go-common/app/interface/openplatform/seo/server/http/sitemap.go

21 lines
353 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package http
import (
"net/http"
"go-common/library/log"
bm "go-common/library/net/http/blademaster"
)
func sitemap(c *bm.Context) {
logUA(c)
res, err := srv.Sitemap(c, c.Request.Host)
if err != nil {
log.Error(err.Error())
return
}
c.Writer.Header().Set("Content-Type", "text/xml;charset=utf-8")
c.String(http.StatusOK, string(res))
}