chrly/lib/routes/NotFound.go
ErickSkrauch 58c05533f3 Revert "Revert "Реализована страница 404 ошибки""
This reverts commit 22f80576bd903bd63c38bb29570e410ce8fb5b7c.
2016-07-29 12:14:32 +03:00

19 lines
362 B
Go

package routes
import (
"net/http"
"encoding/json"
)
func NotFound(w http.ResponseWriter, r *http.Request) {
json, _ := json.Marshal(map[string]string{
"status": "404",
"message": "Not Found",
"link": "http://docs.ely.by/skin-system.html",
})
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusNotFound)
w.Write(json)
}