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

Method CLIASNOrgHandler

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

Source from the content-addressed store, hash-verified

247}
248
249func (s *Server) CLIASNOrgHandler(w http.ResponseWriter, r *http.Request) *appError {
250 response, err := s.newResponse(r)
251 if err != nil {
252 return badRequest(err).WithMessage(err.Error()).AsJSON()
253 }
254 fmt.Fprintf(w, "%s\n", response.ASNOrg)
255 return nil
256}
257
258func (s *Server) JSONHandler(w http.ResponseWriter, r *http.Request) *appError {
259 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