cloudapi: use Recover middleware to handle panics

recover from panics such as out-of-bounds array access & nil
pointer access, print a stack trace and return 5xx error
instead of the service crashing and relying on Execution
framework to handle crashes
This commit is contained in:
Diaa Sami 2021-09-23 18:18:54 +02:00 committed by Tom Gundersen
parent bc9e340ca5
commit 60e403e53e
34 changed files with 4304 additions and 0 deletions

29
vendor/github.com/labstack/gommon/bytes/README.md generated vendored Normal file
View file

@ -0,0 +1,29 @@
# Bytes
- Format bytes integer to human readable bytes string.
- Parse human readable bytes string to bytes integer.
## Installation
```go
go get github.com/labstack/gommon/bytes
```
## [Usage](https://github.com/labstack/gommon/blob/master/bytes/bytes_test.go)
### Format
```go
println(bytes.Format(13231323))
```
`12.62MB`
### Parse
```go
b, _ = Parse("2M")
println(b)
```
`2097152`