mirror of
https://github.com/elyby/chrly.git
synced 2024-11-18 03:03:01 +05:30
c2d0cb93cb
Реализовано переподключение к Redis в случае, если соединение упадёт
19 lines
362 B
Go
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)
|
|
}
|