-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal/capture error 983 #987
Open
ousloob
wants to merge
57
commits into
go-chi:TestWrapResponseWriter
Choose a base branch
from
ousloob:proposal/capture-error-983
base: TestWrapResponseWriter
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Proposal/capture error 983 #987
ousloob
wants to merge
57
commits into
go-chi:TestWrapResponseWriter
from
ousloob:proposal/capture-error-983
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: TheRandomCharacter <[email protected]>
Co-authored-by: TheRandomCharacter <[email protected]>
Co-authored-by: Justin Burr <[email protected]>
Co-authored-by: lutherwaves <git config --global user.email>
…eware (#…" (go-chi#924) This reverts commit f10dc4a.
* middleware: add Discard method to WrapResponseWriter * resolve review comments * use ioutil.Discard and deprecate the public interface * move the Discard method back to the public interface * discard calls to WriteHeader too
* Add Find to Routes interface * Add example of using Routes.Find * Rename find-pattern example * And find_pattern middleware * Refactor find-pattern example to use official FindPattern middleware * Remove middleware.FindPattern for now --------- Co-authored-by: jriddle <[email protected]> Co-authored-by: Vojtech Vitek <[email protected]>
* feat(): add CF-Connection-IP * feat(): custom real ip header go-chi#908 * fix(): typo * refactor(): remove cf-connecting-ip from default headers * refactor(): back to unexported default headers
The comment was meant to demonstrate how non-wildcard routes can match wilecard routes, but there was likely a typo that made it incorrect.
* Fix condition in TestRedirectSlashes * Improve test logs in middleware/strip_test.go --------- Co-authored-by: Vojtech Vitek <[email protected]>
…o-chi#571) * Fix typo in doc comment for Throttle middleware * Add ability to specify response HTTP status code for Throttle middleware
* Fix Mux.Find not correctly handling nested routes * Add more test cases for TextMuxFind * Fix Mux.Find returning partial path for failing cases
Informational status in the range 100-199 may be sent multiple times, unlike statuses in the range 200-599. This follows usage in the stdlib: https://github.com/golang/go/blob/485ed2fa5b5e0b7067ef72a0f4bdc9ca12b77ed7/src/net/http/server.go#L1216
This reverts commit cbaac31.
Now that we're 1.20+ instead of 1.14+ we can use 1.18's strings.Cut in a few places to simplify code.
This is a new go vet analysis pass that fires under go 1.24: $ go1.24rc2 vet ./... # github.com/go-chi/chi/v5 # [github.com/go-chi/chi/v5] ./mux_test.go:236:12: non-constant format string in call to (*testing.common).Fatalf ... The strings would be parsed as format strings which is not intended. See golang/go#60529 for details.
This also bumps the minimum supported version of Go to 1.16 (which itself has beel EOL for almost 3 years now) Co-authored-by: Vojtech Vitek (golang.cz) <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds error capturing capabilities to Chi's WrapResponseWriter interface, enabling middleware to track and log errors that coour during request handling.
(#983)