alert: Add optimizations (#939)

* alert: Add optimizations

* alert: add basic benchmarks

* alert: fix linter issue

* documentation: change to text/template as html/template escapes to protect against code injection. Add readme.md for alert.

* README: Add package name

* alert: link up with engine settings

* request: isVerbose refactor

* Update exchanges/alert/alert_test.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* Update exchanges/alert/alert.go

Co-authored-by: Scott <gloriousCode@users.noreply.github.com>

* glorious: nits

* glorious: fun police

* documentation: regen

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
This commit is contained in:
Ryan O'Hara-Reid
2022-07-01 15:35:28 +10:00
committed by GitHub
parent 1736c1ed8d
commit 68db4155bf
11 changed files with 413 additions and 61 deletions

View File

@@ -385,14 +385,6 @@ func isVerbose(ctx context.Context, verbose bool) bool {
return true
}
val := ctx.Value(contextVerboseFlag)
if val == nil {
return false
}
isCtxVerbose, ok := val.(bool)
if !ok {
return false
}
isCtxVerbose, _ := ctx.Value(contextVerboseFlag).(bool)
return isCtxVerbose
}