Command line client for Write.as https://write.as/apps/cli
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

21 linhas
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. }