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

Method CLIASNHandler

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

Source from the content-addressed store, hash-verified

238}
239
240func (s *Server) CLIASNHandler(w http.ResponseWriter, r *http.Request) *appError {
241 response, err := s.newResponse(r)
242 if err != nil {
243 return badRequest(err).WithMessage(err.Error()).AsJSON()
244 }
245 fmt.Fprintf(w, "%s\n", response.ASN)
246 return nil
247}
248
249func (s *Server) CLIASNOrgHandler(w http.ResponseWriter, r *http.Request) *appError {
250 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