util/srv/response.go
func (s *Server) RespondResult(logger log.Logger, w http.ResponseWriter,
	result interface{}) {
	logger = logger.Add("result", result)
	data, err := json.Marshal(result)
	if err != nil {
		logger.Error("failed to marhsal respond result: " + err.Error())
		s.RespondError(logger, w, ErrInternalServerError)
		return
	}

	s.respond(logger, w, &Response{Result: data})
}
func (s *Server) RespondResult(logger log.Logger, w http.ResponseWriter,
	result interface{}) {
	logger = logger.Add("result", result)
	data, err := json.Marshal(result)
	if err != nil {
		logger.Error("failed to marhsal respond result: " + err.Error())
		s.RespondError(logger, w, ErrInternalServerError)
		return
	}

	s.respond(logger, w, &Response{Result: data})
}
func ( s * Server ) RespondResult ( logger log . Logger , w http . ResponseWriter , result interface { } ) { logger = logger . Add ( " " , result ) data , err := json . Marshal ( result ) if err != nil { logger . Error ( " " + err . Error ( ) ) s . RespondError ( logger , w , ErrInternalServerError ) return } s . respond ( logger , w , & Response { Result : data } ) }
// RespondResult sends a response with a given result.
RespondResult sends a response with a given result .