
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
rex is a minimalistic but robust HTTP router built on Go 1.22’s enhanced http.ServeMux. It offers a range of features for rapid web application development, including:
rex.FormScanner interface.validator package.r.SPA to serve a single-page application.slog package.rex.Handler.r.Static to serve static files from a directory or r.StaticFS to serve files from a http.FileSystem.
Both of these method can serve the minified version of the files if present and rex.ServeMinifiedAssetsIfPresent is set to true. You can also easily convert standard HTTP handlers to
rexhandlers:
rex.WrapHandler to wrap a http.Handler.rex.WrapFunc to wrap a http.HandlerFunc.rex.FormError from r.BodyParser and validator.ValidationErrors if there is a validation error.go get -u github.com/abiiranathan/rex
FormScannerThis example shows how to implement a custom type that satisfies the FormScanner interface.
type Date time.Time // Date in format YYYY-MM-DD
// FormScan implements the FormScanner interface.
func (d *Date) FormScan(value any) error {
v, ok := value.(string)
if !ok {
return fmt.Errorf("date value is not a string")
}
t, err := time.Parse("2006-01-02", v)
if err != nil {
return fmt.Errorf("invalid date format")
}
*d = Date(t)
return nil
}
For a complete example of template rendering and router usage, see the example in cmd/server/main.go.
rex includes a few external libraries, used only in the middleware subpackage. Explore the middleware package for more details and usage examples.
Run all tests with the following command:
go test -v ./...
Run benchmarks with memory profiling enabled:
go test -bench=. ./... -benchmem
Pull requests are welcome! For major changes, please open an issue to discuss your ideas first.
Don’t forget to update tests as needed.
This project is licensed under the MIT License.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.