fix(context): check handler is nil (#3413)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* fixed #3404 2022-11-23 * up 2022-11-23 * refactor: refactor context handling and nil checks - Refactor nil checks to improve readability in `context.go` - Modify the control flow in `HandlerNames` and `Next` methods to continue on nil values before appending or invoking handlers in `context.go` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * test: refactor context_test.go for clarity and efficiency - Insert a `nil` value into the `HandlersChain` array in `context_test.go` - Remove empty test functions in `context_test.go` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> ---------
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diff stats
2 files+8 added−3 removed
- other:+8 added−3 removed