2017-08-20 03:52:42 +05:30
|
|
|
package http
|
2017-06-30 21:10:25 +05:30
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
2017-08-20 03:52:42 +05:30
|
|
|
func (cfg *Config) NotFound(response http.ResponseWriter, request *http.Request) {
|
|
|
|
data, _ := json.Marshal(map[string]string{
|
2017-06-30 21:10:25 +05:30
|
|
|
"status": "404",
|
|
|
|
"message": "Not Found",
|
|
|
|
"link": "http://docs.ely.by/skin-system.html",
|
|
|
|
})
|
|
|
|
|
|
|
|
response.Header().Set("Content-Type", "application/json")
|
|
|
|
response.WriteHeader(http.StatusNotFound)
|
2017-08-20 03:52:42 +05:30
|
|
|
response.Write(data)
|
2017-06-30 21:10:25 +05:30
|
|
|
}
|