rollbar.go 405 B

123456789101112131415161718192021222324
  1. package logger
  2. import "net/http"
  3. var RollBarEnabled = false
  4. type RollBarStatusCodes []int
  5. var RollBarSkipStatusCodes = RollBarStatusCodes{
  6. http.StatusOK,
  7. http.StatusNotModified,
  8. http.StatusTemporaryRedirect,
  9. http.StatusNotFound,
  10. http.StatusMethodNotAllowed,
  11. }
  12. func (r RollBarStatusCodes) contain(status int) bool {
  13. for _, v := range r {
  14. if v == status {
  15. return true
  16. }
  17. }
  18. return false
  19. }