Command line client for Write.as https://write.as/apps/cli
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

21 líneas
359 B

  1. package impart
  2. import (
  3. "net/http"
  4. )
  5. // HTTPError holds an HTTP status code and an error message.
  6. type HTTPError struct {
  7. Status int
  8. Message string
  9. }
  10. // Error displays the HTTPError's error message and satisfies the error
  11. // interface.
  12. func (h HTTPError) Error() string {
  13. if h.Message == "" {
  14. return http.StatusText(h.Status)
  15. }
  16. return h.Message
  17. }