Making http.Handler a little easier
Find a file
Dan Jones fe7e464a62 Add JSONResponder type and tests
- Introduced JSONResponder type in handler.go, combining JSON body parsing with ResponseHelper handling.
- Implemented ServeHTTP for JSONResponder to automatically decode JSON requests and return structured responses.
- Added comprehensive unit tests for JSONResponder in handler_test.go, covering successful responses, invalid JSON, empty bodies, and error propagation.
- Ensured all new tests adhere to existing project conventions and pass linting checks.
2025-07-08 16:41:08 -05:00
.gitignore 🚧 Scaffold basic functionality 2025-07-07 21:37:05 -05:00
.golangci.yaml Minor test improvements 2025-07-08 11:32:06 -05:00
go.mod Implement Handler and HandlerFunc, add comprehensive tests 2025-07-07 21:39:47 -05:00
go.sum Implement Handler and HandlerFunc, add comprehensive tests 2025-07-07 21:39:47 -05:00
handler.go Add JSONResponder type and tests 2025-07-08 16:41:08 -05:00
handler_test.go Add JSONResponder type and tests 2025-07-08 16:41:08 -05:00
helper.go Refactor ResponseHelper and add ResponderHandler 2025-07-08 09:12:53 -05:00
helper_test.go Minor test improvements 2025-07-08 11:32:06 -05:00
response.go Refactor ResponseHelper and add ResponderHandler 2025-07-08 09:12:53 -05:00
response_test.go Minor test improvements 2025-07-08 11:32:06 -05:00
Taskfile.yml 🚧 Scaffold basic functionality 2025-07-07 21:37:05 -05:00