scanInfoHandler is an HTTP handler that returns a JSON blob result describing the possible families and scans to be run.
(w http.ResponseWriter, r *http.Request)
| 61 | // scanInfoHandler is an HTTP handler that returns a JSON blob result describing |
| 62 | // the possible families and scans to be run. |
| 63 | func scanInfoHandler(w http.ResponseWriter, r *http.Request) error { |
| 64 | log.Info("setting up scaninfo handler") |
| 65 | response := api.NewSuccessResponse(scan.Default) |
| 66 | enc := json.NewEncoder(w) |
| 67 | return enc.Encode(response) |
| 68 | } |
| 69 | |
| 70 | // NewInfoHandler returns a new http.Handler that handles a request for scan info. |
| 71 | func NewInfoHandler() http.Handler { |
nothing calls this directly
no test coverage detected
searching dependent graphs…