// manifestSender sends a JSON-encoded response to the client including the // list of files contained in the charm bundle. func (h *charmsHandler) manifestSender(w http.ResponseWriter, r *http.Request, bundle *charm.Bundle) { manifest, err := bundle.Manifest() if err != nil { http.Error( w, fmt.Sprintf("unable to read archive in %q: %v", bundle.Path, err), http.StatusInternalServerError) return } h.sendJSON(w, http.StatusOK, ¶ms.CharmsResponse{Files: manifest.SortedValues()}) }