MCPcopy Index your code
hub / github.com/mpolden/echoip / CLICityHandler

Method CLICityHandler

http/http.go:222–229  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

220}
221
222func (s *Server) CLICityHandler(w http.ResponseWriter, r *http.Request) *appError {
223 response, err := s.newResponse(r)
224 if err != nil {
225 return badRequest(err).WithMessage(err.Error()).AsJSON()
226 }
227 fmt.Fprintln(w, response.City)
228 return nil
229}
230
231func (s *Server) CLICoordinatesHandler(w http.ResponseWriter, r *http.Request) *appError {
232 response, err := s.newResponse(r)

Callers

nothing calls this directly

Calls 4

newResponseMethod · 0.95
badRequestFunction · 0.85
AsJSONMethod · 0.80
WithMessageMethod · 0.80

Tested by

no test coverage detected