// handlerInfo is handler for GET:/info request.
handlerInfo is handler for GET:/info request.
// handlerInfo is handler for GET : / info request .
func handlerInfo(w http.ResponseWriter, r *http.Request) {
	var err error
	start, code := time.Now(), http.StatusCreated
	defer func() {
		deferHandler(w, r, code, start, err)
	}()
	w.Header().Set("Content-Type", "application/json; charset=UTF-8")
	if r.Method != "GET" {
		err = fmt.Errorf("%v method is not allowed", r.Method)
		return
	}
	response := &InfoResponse{
		Author:   Author,
		Info:     "Radio-t chat yandex translation-bot",
		Commands: []string{},
	}
	w.WriteHeader(http.StatusCreated)
	encoder := json.NewEncoder(w)
	err = encoder.Encode(response)
	if err != nil {
		return
	}
}
func handlerInfo ( w http . ResponseWriter , r * http . Request ) { var err error start , code := time . Now ( ) , http . StatusCreated defer func ( ) { deferHandler ( w , r , code , start , err ) } ( ) w . Header ( ) . Set ( " " , " " ) if r . Method != " " { err = fmt . Errorf ( " " , r . Method ) return } response := & InfoResponse { Author : Author , Info : " " , Commands : [ ] string { } , } w . WriteHeader ( http . StatusCreated ) encoder := json . NewEncoder ( w ) err = encoder . Encode ( response ) if err != nil { return } }
handlerInfo is handler for GET:/info request.
handlerInfo is handler for GET : / info request .