Fix multiple typos found across the codebase:
- response.go: rename unexported field "commited" to "committed"
- server.go: fix "addres" to "address" in comment
- middleware/csrf.go: fix "formated" to "formatted" in comment
- middleware/request_logger.go: fix "commited" to "committed" in comment
- echotest/context.go: fix "wil" to "will" in comments
Move strconv.Quote(config.Realm) from per-request execution
to middleware initialization for better performance.
- Pre-compute quoted realm at middleware creation time
- Avoids repeated string operations on every auth failure
- Maintains same behavior with better efficiency
Performance improvement suggested during code review.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace manual for loop with strings.Cut for credential parsing
- Simplify realm handling to always quote according to RFC 7617
- Improve code readability and maintainability
Fixes#2794🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Addresses issue #2665 by providing comprehensive documentation for the Logger
middleware including:
**Configuration Examples:**
- Basic usage with default settings
- Custom simple and JSON formats
- Custom time formatting
- Header, query, form, and cookie logging
- File output configuration
- Custom tag functions
- Conditional logging with Skipper
- External logging service integration
**Detailed Tag Reference:**
- Complete list of all available tags (time, request, response, dynamic)
- Clear explanations of each tag's purpose and format
- Examples showing proper usage
**Enhanced Field Documentation:**
- Detailed descriptions for all LoggerConfig fields
- Examples for each configuration option
- Default values and behavior
**Troubleshooting Section:**
- Common issues and solutions
- Performance optimization tips
- Best practices for high-traffic applications
**Function Documentation:**
- Enhanced Logger() and LoggerWithConfig() documentation
- Example outputs and usage patterns
This makes the Logger middleware much more accessible to new users while
providing advanced configuration guidance for experienced developers.
Fixes#2665🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>