Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Everest committed Oct 9, 2020
1 parent 2927929 commit d14d16f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Middleware for an HTTP server in GoLang to watch for unhandled exceptions. The m

- Provide an error boundary for panic
- Email alerts in production
- Slack alrets in production
- Slack alerts in production
- Discord alerts in production
- Log & display stack trace in development
- Code browser

Expand All @@ -23,12 +24,13 @@ Option | Default | Description
`WithDebugPath(string)` | `"/watch/debug"` | Path used by `watch` to show in-browser files for debugging (code browser) in development. This option will be silently ignored during production.
`WithEmail(watch.EmailDetails)` | - | Issue email alerts on Failure in Production. This option will be silently ignored during development.
`WithSlack(watch.SlackDetails)` | - | Issue slack alerts on Failure in Production. This option will be silently ignored during development.
`WithDiscord(watch.DiscordDetails)` | - | Issue discord alerts on Failure in Production. This option will be silently ignored during development.

You can find sample usage for these arguments [here](example/main.go). Kindly note that the usage example is a non-compulsive sample representation and may not directly represent your use case.

## Environment?
You can toggle between dev and production using `WithDevelopment` [option](#options). The following are things enabled per environment.

- **Production**: Email alerts, Slack alerts, Log
- **Production**: Email alerts, Slack alerts, Discord alerts, Log
- **Development**: Stack Trace, Code browser (See `WithDebugPath` option), Log

0 comments on commit d14d16f

Please sign in to comment.