- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for RenderError (0.09 sec)
-
pkg/ctrlz/fw/utils.go
// limitations under the License. package fw import ( "bytes" "encoding/json" "fmt" "html/template" "net/http" ) // RenderError outputs an error message func RenderError(w http.ResponseWriter, statusCode int, err error) { w.WriteHeader(statusCode) w.Header().Set("Content-Type", "text/plain; charset=utf-8") _, _ = fmt.Fprintf(w, "%v", err) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 1.6K bytes - Viewed (0) -
pkg/ctrlz/topics/scopes.go
return } fw.RenderError(w, http.StatusBadRequest, fmt.Errorf("unknown scope name: %s", name)) } func putScope(w http.ResponseWriter, req *http.Request) { vars := mux.Vars(req) name := vars["scope"] var info scopeInfo if err := json.NewDecoder(req.Body).Decode(&info); err != nil { fw.RenderError(w, http.StatusBadRequest, fmt.Errorf("unable to decode request: %v", err))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 4K bytes - Viewed (0)